ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A path can be followed by an item in a location. More...

#include <path.h>

Inheritance diagram for Stark::Resources::Path:
Collaboration diagram for Stark::Resources::Path:

List of all members.

Public Types

enum  SubType { kPath2D = 1, kPath3D = 2 }

Public Member Functions

 Path (Object *parent, byte subType, uint16 index, const Common::String &name)
virtual ~Path ()
virtual void readData (Formats::XRCReadStream *stream) override
 Deserialize the resource static data and initial state.
virtual uint getEdgeCount () const =0
 Get the edge count in the path.
virtual Math::Vector3d getEdgeDirection (uint edgeIndex) const
 Get a unit vector pointing in the direction of an edge.
virtual float getSortKey () const
 Get the sort key to be used by the item following the path.
float getWeightedEdgeLength (uint edgeIndex) const
 Get an edge's length.
Math::Vector3d getWeightedPositionInEdge (uint edgeIndex, float positionInEdge)
 Get the scene position from a position in an edge.

Static Public Member Functions

static Objectconstruct (Object *parent, byte subType, uint16 index, const Common::String &name)
 Path factory.

Static Public Attributes

static const Type::ResourceType TYPE = Type::kPath

Protected Member Functions

void printData () override
float getEdgeLength (uint edgeIndex) const
virtual float getVertexWeight (uint vertexIndex) const =0
virtual Math::Vector3d getVertexPosition (uint vertexIndex) const =0

Protected Attributes

uint32 _field_30

Detailed Description

A path can be followed by an item in a location.

Path are made of a list of vertices. Two consecutive vertices delimit an edge. Each vertex has a weight. A higher weight means a higher movement speed.

Definition at line 46 of file path.h.


Member Enumeration Documentation

Enumerator:
kPath2D 
kPath3D 

Definition at line 50 of file path.h.


Constructor & Destructor Documentation

Stark::Resources::Path::Path ( Object parent,
byte  subType,
uint16  index,
const Common::String name 
)

Definition at line 44 of file path.cpp.

Stark::Resources::Path::~Path (  )  [virtual]

Definition at line 41 of file path.cpp.


Member Function Documentation

Object * Stark::Resources::Path::construct ( Object parent,
byte  subType,
uint16  index,
const Common::String name 
) [static]

Path factory.

Definition at line 30 of file path.cpp.

virtual uint Stark::Resources::Path::getEdgeCount (  )  const [pure virtual]

Get the edge count in the path.

Implemented in Stark::Resources::Path2D, and Stark::Resources::Path3D.

Math::Vector3d Stark::Resources::Path::getEdgeDirection ( uint  edgeIndex  )  const [virtual]

Get a unit vector pointing in the direction of an edge.

Only valid for 3D paths

Reimplemented in Stark::Resources::Path3D.

Definition at line 93 of file path.cpp.

float Stark::Resources::Path::getEdgeLength ( uint  edgeIndex  )  const [protected]

Definition at line 58 of file path.cpp.

float Stark::Resources::Path::getSortKey (  )  const [virtual]

Get the sort key to be used by the item following the path.

Reimplemented in Stark::Resources::Path3D.

Definition at line 89 of file path.cpp.

virtual Math::Vector3d Stark::Resources::Path::getVertexPosition ( uint  vertexIndex  )  const [protected, pure virtual]
virtual float Stark::Resources::Path::getVertexWeight ( uint  vertexIndex  )  const [protected, pure virtual]
float Stark::Resources::Path::getWeightedEdgeLength ( uint  edgeIndex  )  const

Get an edge's length.

Definition at line 65 of file path.cpp.

Math::Vector3d Stark::Resources::Path::getWeightedPositionInEdge ( uint  edgeIndex,
float  positionInEdge 
)

Get the scene position from a position in an edge.

Definition at line 73 of file path.cpp.

void Stark::Resources::Path::printData (  )  [override, protected, virtual]

Reimplemented from Stark::Resources::Object.

Reimplemented in Stark::Resources::Path2D, and Stark::Resources::Path3D.

Definition at line 54 of file path.cpp.

void Stark::Resources::Path::readData ( Formats::XRCReadStream stream  )  [override, virtual]

Deserialize the resource static data and initial state.

Reimplemented from Stark::Resources::Object.

Reimplemented in Stark::Resources::Path2D, and Stark::Resources::Path3D.

Definition at line 50 of file path.cpp.


Member Data Documentation

Definition at line 89 of file path.h.

const Type::ResourceType Stark::Resources::Path::TYPE = Type::kPath [static]

Definition at line 48 of file path.h.


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


Generated on Sat Jan 12 2019 05:05:22 for ResidualVM by doxygen 1.7.1
curved edge   curved edge