ScEng::PolyLine Class Reference

Describes a PolyLine. More...

#include <polyline.h>

List of all members.

Public Types

enum  CHUNKS { POLYLINE_CHUNKID = 0x00000010, VERTS_CHUNKID = 0x00000020, SEGMENTS_CHUNKID = 0x00000030 }
 Enum chunks. More...

Public Member Functions

void SetNumVerts (int nv, bool keep=false)
 Sets the number of vertices in this polyline.
int GetNumVerts ()
 Returns the number of vertices in this polyline.
void SetVertPosition (int i_v, GMT::Point3F p)
 Sets the position of the vertex i_v.
void SetVert (int i_v, Vert v)
 Sets the vertex i_v.
Vert GetVert (int i_v)
 Returns the specified vertex.
GMT::Point3F GetVertPosition (int i_v)
 Returns the position of the vertex i_v.
void SetNumSegments (int ns, bool keep=false)
 Sets the number of segments in this polyline.
int GetNumSegments ()
 Returns the number of segments in this polyline.
void SetSegment (int i_s, int v0, int v1)
 Sets the segment i_s.
Segment GetSegment (int i_s)
 Returns the segment i_s.
void DeleteThis ()
 Deletes this class and all its members.
int Save (SceneSave *scene_save)
 Saves the info for this class.
int Load (SceneLoad *scene_load)
 Loads the info for this class.

Public Attributes

int num_verts
 The total number of vertices in this polyline.
Vertverts
 The vertices in this polyline.
int num_segments
 The total number of segments in this polyline.
Segmentsegments
 The segments in this polyline.


Detailed Description

Describes a PolyLine.

A polyline is a collection of vertices and segments. A vertex can be connected to 1, 2 or more vertices with segments.


Member Enumeration Documentation

enum ScEng::PolyLine::CHUNKS

Enum chunks.

Enums the chunks used for this class

Enumerator:
POLYLINE_CHUNKID  Polyline chunk
VERTS_CHUNKID  Vertices chunk
SEGMENTS_CHUNKID  Faces chunk


Member Function Documentation

void ScEng::PolyLine::SetNumVerts ( int  nv,
bool  keep = false 
)

Sets the number of vertices in this polyline.

Sets the number of verts and allocates the memory for the verts array.

Parameters:
nv the new number of verts
keep if true, the verts are kept, if false, they are deleted.

void ScEng::PolyLine::SetVertPosition ( int  i_v,
GMT::Point3F  p 
)

Sets the position of the vertex i_v.

Parameters:
i_v the index of the vertex to set
p the new position for the vertex i_v
See also:
SetVert(int i_v, Vert new_vert)

void ScEng::PolyLine::SetVert ( int  i_v,
Vert  v 
)

Sets the vertex i_v.

Parameters:
i_v the index of the vertex to set
v the vertex

Vert ScEng::PolyLine::GetVert ( int  i_v  ) 

Returns the specified vertex.

Parameters:
i_v the index of the vertex
Returns:
Returns the specified Vert

GMT::Point3F ScEng::PolyLine::GetVertPosition ( int  i_v  ) 

Returns the position of the vertex i_v.

Parameters:
i_v the index of the vertex
Returns:
The position of the vertex i_v

void ScEng::PolyLine::SetNumSegments ( int  ns,
bool  keep = false 
)

Sets the number of segments in this polyline.

Sets the number of segments and allocates the memory for the segments array.

Parameters:
ns the new number of verts
keep if true, the segments are kept, if false, they are deleted.

void ScEng::PolyLine::SetSegment ( int  i_s,
int  v0,
int  v1 
)

Sets the segment i_s.

Parameters:
i_s the index of the segment to set
v0 the new value of vertex 0 in segment i_s
v1 the new value of vertex 1 in segment i_s


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:23 2007 for SceneEngine by  doxygen 1.5.1-p1