3es
0.7
|
Defines a rectangular planar section to display. More...
#include <3esplane.h>
Public Member Functions | |
Plane (uint32_t id=0u, const V3Arg &position=V3Arg(0, 0, 0), const V3Arg &normal=DefaultNormal, float scale=1.0f, float normalLength=1.0f) | |
Plane (uint32_t id, uint16_t category, const V3Arg &position=V3Arg(0, 0, 0), const V3Arg &normal=DefaultNormal, float scale=1.0f, float normalLength=1.0f) | |
Create a plane. More... | |
Plane & | setNormal (const V3Arg &normal) |
Set the plane normal. More... | |
Vector3f | normal () const |
Get the plane normal. More... | |
Plane & | setScale (float scale) |
Set the plane "scale", which controls the render size. More... | |
float | scale () const |
Get the plane scaling values. More... | |
Plane & | setNormalLength (float length) |
Set the plane normal's display length. More... | |
float | normalLength () const |
Get the plane normal display length. More... | |
![]() | |
Shape (uint16_t routingId, uint32_t id=0) | |
Shape (uint16_t routingId, uint32_t id, uint16_t category) | |
Construct a box object. More... | |
uint16_t | routingId () const |
uint32_t | id () const |
Shape & | setId (uint32_t id) |
uint16_t | category () const |
Shape & | setCategory (uint16_t category) |
Shape & | setWireframe (bool wire) |
Sets the wireframe flag value for this shape. More... | |
bool | isWireframe () const |
Returns true if the wireframe flag is set. More... | |
Shape & | setTransparent (bool transparent) |
Sets the transparent flag value for this shape. More... | |
bool | isTransparent () const |
Returns true if the transparent flag is set. More... | |
Shape & | setTwoSided (bool twoSided) |
Sets the two sided shader flag value for this shape. More... | |
bool | isTwoSided () const |
Returns true if the two sided shader flag is set. More... | |
Shape & | setFlags (uint16_t flags) |
Set the full set of ObjectFlag values. More... | |
uint16_t | flags () const |
Retrieve the full set of ObjectFlag values. More... | |
Shape & | setPosition (const V3Arg &pos) |
Vector3f | position () const |
Shape & | setPosX (float p) |
Shape & | setPosY (float p) |
Shape & | setPosZ (float p) |
Shape & | setRotation (const QuaternionArg &rot) |
Quaternionf | rotation () const |
Shape & | setScale (const V3Arg &scale) |
Vector3f | scale () const |
Shape & | setColour (const Colour &colour) |
Colour | colour () const |
virtual void | updateFrom (const Shape &other) |
Update the attributes of this shape to match other . More... | |
virtual bool | writeCreate (PacketWriter &stream) const |
Writes the create message to stream . More... | |
virtual int | writeData (PacketWriter &stream, unsigned &progressMarker) const |
Called only for complex shapes to write additional creation data. More... | |
bool | writeUpdate (PacketWriter &stream) const |
bool | writeDestroy (PacketWriter &stream) const |
virtual bool | isComplex () const |
Is this a complex shape? Complex shapes have writeData() called. More... | |
virtual int | enumerateResources (const Resource **resources, int capacity, int fetchOffset=0) const |
Enumerate the resources used by this shape. More... | |
virtual Shape * | clone () const |
Deep copy clone. More... | |
Static Public Attributes | |
static const Vector3f | DefaultNormal |
Defines the default plane normal orientation. More... | |
Additional Inherited Members | |
![]() | |
void | onClone (Shape *copy) const |
Called when copy is created from this object to copy appropriate attributes to copy . More... | |
void | init (uint32_t id, uint16_t cat=0, uint16_t flags=0) |
![]() | |
uint16_t | _routingId |
CreateMessage | _data |
Defines a rectangular planar section to display.
A plane is defined by:
Component | Description |
---|---|
position() | Where to display a planar section. |
normal() | The plane normal. |
scale() | Defines the size of the plane rectangle (X,Y) and normalLength() (Z). |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References setNormal().
|
inline |
Create a plane.
id | The shape ID, unique among Plane objects, or zero for a transient shape. |
category | The category grouping for the shape used for filtering. |
position | Defines the plane origin and where the plane's square is display. |
normal | Defines the plane normal. |
scale | Defines the size of the square to display. |
normalLength | Adjusts the display length of the normal. |
References setNormal().
|
inline |
Get the plane normal.
May not exactly match the axis given via setNormal()
as the axis is defined by the quaternion rotation()
.
References DefaultNormal.
|
inline |
Get the plane normal display length.
|
inline |
Set the plane normal.
Affects rotation()
.
axis | The new axis to set. |
*this
Referenced by Plane().
|
inline |
Set the plane normal's display length.
Alias for scale()
.z
length | Display length to set. |
*this
|
inline |
Set the plane "scale", which controls the render size.
The X,Y axes control the size of the rectangle used to display the plane at position()
. The Z is the same as the normalLength()
. Note there is non guarantee on the orientation of the plane rectangle.
scale | The scaling values to set. |
*this
References scale(), and tes::Vector3< T >::x.
|
static |
Defines the default plane normal orientation.
The rotation()
value is relative to this vector.
The default is (0, 0, 1)
Referenced by normal().