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

An example Object: a Face with a list of indices. More...

#include <example.h>

Inheritance diagram for PLY::Face:
PLY::Object

Public Member Functions

 Face ()
 Default constructor.
 
 Face (const size_t &size)
 Instantiated constructor. More...
 
 Face (const Face &f)
 Copy 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.
size_t size () const
 Get the number of vertices. More...
 
size_t vertex (const size_t &num) const
 Get the index of a vertex. More...
 
Mutators.
void size (const size_t &size)
 Set the number of vertices. More...
 
void vertex (const size_t &num, const size_t &index)
 Set the index of a vertex. 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

AnyValue indices
 The vertex indices.
 

Static Public Attributes

static const char * name = "face"
 The identifier.
 
The Property.
static const Property prop_ind = Property("vertex_indices", LIST, Uint32, Uint8)
 

Detailed Description

An example Object: a Face with a list of indices.

Constructor & Destructor Documentation

PLY::Face::Face ( const size_t &  size)
inline

Instantiated constructor.

Parameters
sizethe number of vertices the Face has.
PLY::Face::Face ( const Face f)
inline

Copy constructor.

This constructor must be explicitly defined, to protect the indices.

Member Function Documentation

Value* PLY::Face::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::Face::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.

size_t PLY::Face::size ( ) const
inline

Get the number of vertices.

Returns
the number of vertices.
void PLY::Face::size ( const size_t &  size)
inline

Set the number of vertices.

Parameters
sizethe number of vertices.
size_t PLY::Face::vertex ( const size_t &  num) const
inline

Get the index of a vertex.

Parameters
numwhich of the vertices of the Face to access.
Returns
the index of the vertex.
void PLY::Face::vertex ( const size_t &  num,
const size_t &  index 
)
inline

Set the index of a vertex.

Parameters
numwhich of the vertices of the Face to access.
indexthe index of the vertex.

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