PLY reader/writer  1.2.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Member Functions | Static Public Attributes | List of all members
PLY::Vertex Struct Reference

An example Object: a Vertex with x,y,z coordinates. More...

#include <example.h>

Inheritance diagram for PLY::Vertex:
PLY::Object

Public Member Functions

 Vertex ()
 Default constructor.
 
 Vertex (float x, float y, float z)
 Instantiated constructor. More...
 
Valueget_value (const Element &elem, const Property &prop)
 Get a Value. More...
 
bool make_element (Element &elem) const
 Construct an Element describing this Object. More...
 
Accessors.
float x () const
 Get the x coordinate. More...
 
float y () const
 Get the y coordinate. More...
 
float z () const
 Get the z coordinate. More...
 
Mutators.
void x (float coord)
 Set the x coordinate. More...
 
void y (float coord)
 Set the y coordinate. More...
 
void z (float coord)
 Set the z coordinate. More...
 
- Public Member Functions inherited from PLY::Object
virtual void prepare (const Element &elem)
 Prepare the Object to represent an Element. More...
 
bool describe_element (Header &header) const
 Add an Element describing this Object to a Header. More...
 
bool storage_test (const Element &elem)
 Check if the Object matches with an Element. More...
 

Public Attributes

The coordinates.
FloatValue value_x
 
FloatValue value_y
 
FloatValue value_z
 

Static Public Attributes

static const char * name = "vertex"
 The identifier.
 
The Properties.
static const Property prop_x = Property("x", SCALAR, Float32)
 
static const Property prop_y = Property("y", SCALAR, Float32)
 
static const Property prop_z = Property("z", SCALAR, Float32)
 

Detailed Description

An example Object: a Vertex with x,y,z coordinates.

Note that this Object forgets any Propeties of the Vertex (e.g. color) except the coordinates.

Constructor & Destructor Documentation

PLY::Vertex::Vertex ( float  x,
float  y,
float  z 
)
inline

Instantiated constructor.

Parameters
xthe value for x
ythe value for y
zthe value for z

Member Function Documentation

Value* PLY::Vertex::get_value ( const Element elem,
const Property prop 
)
inlinevirtual

Get a Value.

Parameters
elemthe Element describing the Object.
propthe Property describing the Value.
Returns
the Value or NULL if the Value is not contained in this Object.

Implements PLY::Object.

bool PLY::Vertex::make_element ( Element elem) const
inlinevirtual

Construct an Element describing this Object.

Note that this is only meant for user-constructed Objects to get the Element easily.

Parameters
[out]elemthe constructed Element.
Returns
true if the Element could be constructed.

Reimplemented from PLY::Object.

float PLY::Vertex::x ( ) const
inline

Get the x coordinate.

Returns
the x coordinate.
void PLY::Vertex::x ( float  coord)
inline

Set the x coordinate.

Parameters
coordthe x coordinate.
float PLY::Vertex::y ( ) const
inline

Get the y coordinate.

Returns
the y coordinate.
void PLY::Vertex::y ( float  coord)
inline

Set the y coordinate.

Parameters
coordthe y coordinate.
float PLY::Vertex::z ( ) const
inline

Get the z coordinate.

Returns
the z coordinate.
void PLY::Vertex::z ( float  coord)
inline

Set the z coordinate.

Parameters
coordthe z coordinate.

The documentation for this struct was generated from the following files: