10 #include "3esmessages.h" 12 #include "3esquaternionarg.h" 18 #pragma warning(disable : 4251) 42 Shape(uint16_t routingId, uint32_t
id = 0);
46 Shape(uint16_t routingId, uint32_t
id, uint16_t category);
47 virtual inline ~
Shape() {}
49 uint16_t routingId()
const;
52 Shape &setId(uint32_t
id);
53 uint16_t category()
const;
54 Shape &setCategory(uint16_t category);
59 Shape &setWireframe(
bool wire);
62 bool isWireframe()
const;
67 Shape &setTransparent(
bool transparent);
70 bool isTransparent()
const;
75 Shape &setTwoSided(
bool twoSided);
78 bool isTwoSided()
const;
84 Shape &setFlags(uint16_t flags);
87 uint16_t flags()
const;
92 Shape &setPosX(
float p);
93 Shape &setPosY(
float p);
94 Shape &setPosZ(
float p);
115 virtual void updateFrom(
const Shape &other);
163 virtual int enumerateResources(
const Resource **resources,
int capacity,
int fetchOffset = 0)
const;
167 virtual Shape *clone()
const;
176 void onClone(
Shape *copy)
const;
178 void init(uint32_t
id, uint16_t cat = 0, uint16_t flags = 0);
185 inline Shape::Shape(uint16_t routingId, uint32_t
id)
186 : _routingId(routingId)
192 inline Shape::Shape(uint16_t routingId, uint32_t
id, uint16_t category)
193 : _routingId(routingId)
199 inline void Shape::init(uint32_t
id, uint16_t cat, uint16_t
flags)
212 inline uint16_t Shape::routingId()
const 218 inline uint32_t Shape::id()
const 224 inline Shape &Shape::setId(uint32_t
id)
231 inline uint16_t Shape::category()
const 237 inline Shape &Shape::setCategory(uint16_t category)
299 inline Shape &Shape::setPosition(
const V3Arg &pos)
308 inline Vector3f Shape::position()
const 314 inline Shape &Shape::setPosX(
float p)
321 inline Shape &Shape::setPosY(
float p)
328 inline Shape &Shape::setPosZ(
float p)
351 inline Shape &Shape::setScale(
const V3Arg &scale)
360 inline Vector3f Shape::scale()
const 366 inline Shape &Shape::setColour(
const Colour &colour)
373 inline Colour Shape::colour()
const 383 #endif // _3ESSHAPE_H_ uint32_t colour
Initial object colour.
Definition: 3esmessages.h:355
A base class for encapsulating a shape which is to be represented remotely.
Definition: 3esshape.h:39
A 32-bit integer colour class.
Definition: 3escolour.h:19
float scale[3]
Object scale.
Definition: 3esmessages.h:358
uint16_t flags() const
Retrieve the full set of ObjectFlag values.
Definition: 3esshape.h:293
Shape & setFlags(uint16_t flags)
Set the full set of ObjectFlag values.
Definition: 3esshape.h:286
float position[3]
Object position.
Definition: 3esmessages.h:356
Shape & setTransparent(bool transparent)
Sets the transparent flag value for this shape.
Definition: 3esshape.h:258
virtual int writeData(PacketWriter &stream, unsigned &progressMarker) const
Called only for complex shapes to write additional creation data.
Definition: 3esshape.h:133
uint32_t id
Id of the object to create. Zero for transient objects.
Definition: 3esmessages.h:404
Use a two sided shader.
Definition: 3esmessages.h:95
Definition: 3esbounds.h:13
bool isTwoSided() const
Returns true if the two sided shader flag is set.
Definition: 3esshape.h:280
float rotation[4]
Object rotation (quaternion)
Definition: 3esmessages.h:357
Vector3< float > Vector3f
Defines a single precision vector.
Definition: 3esvector3.h:14
The Resource base class defines an interface for any resource used by Shape objects such as MeshSet...
Definition: 3esresource.h:34
The object supports transparency. Use the colour alpha channel.
Definition: 3esmessages.h:94
uint32_t c
Encoded colour value.
Definition: 3escolour.h:39
bool isTransparent() const
Returns true if the transparent flag is set.
Definition: 3esshape.h:266
Represents a vector in R3.
Definition: 3esvector3.h:14
A helper structure used to convert from float or double pointers to Vector3f arguments.
Definition: 3esv3arg.h:14
Defines an object creation message.
Definition: 3esmessages.h:399
uint16_t reserved
Reserved for future use.
Definition: 3esmessages.h:407
uint16_t flags
Flags controlling the appearance and creation of the object.
Definition: 3esmessages.h:406
uint16_t category
Object categorisation. Used to control visibility.
Definition: 3esmessages.h:405
Show the object as a wireframe mesh.
Definition: 3esmessages.h:93
A helper structure used to convert from float or double pointers to Quaternionf arguments.
Definition: 3esquaternionarg.h:14
bool isWireframe() const
Returns true if the wireframe flag is set.
Definition: 3esshape.h:252
virtual bool isComplex() const
Is this a complex shape? Complex shapes have writeData() called.
Definition: 3esshape.h:140
Quaternion< float > Quaternionf
Defines a single precision quaternion.
Definition: 3esquaternion.h:198
ObjectAttributes attributes
Initial transformation and colour.
Definition: 3esmessages.h:408
A utility class for writing payload data to a PacketHeader.
Definition: 3espacketwriter.h:34
Shape & setTwoSided(bool twoSided)
Sets the two sided shader flag value for this shape.
Definition: 3esshape.h:272
Shape & setWireframe(bool wire)
Sets the wireframe flag value for this shape.
Definition: 3esshape.h:244