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

A floor face (triangle) edge. More...

#include <floor.h>

Collaboration diagram for Stark::Resources::FloorEdge:

List of all members.

Public Member Functions

 FloorEdge (uint16 vertexIndex1, uint16 vertexIndex2, uint32 faceIndex1)
void buildNeighbours (const Floor *floor)
 Build a list of neighbour edges in the graph.
void computeMiddle (const Floor *floor)
 Set the edge middle position.
void setOtherFace (uint32 faceIndex)
 Set the edge's second face.
bool hasVertices (uint16 vertexIndex1, uint16 vertexIndex2) const
 Check if the edge has the same vertices as the parameters.
Common::Array< FloorEdge * > getNeighbours () const
 List the edge neighbour edges in the floor.
float costTo (const FloorEdge *other) const
 Computes the cost for going to a neighbour edge.
Math::Vector3d getPosition () const
 Get the edge position.
bool isFloorBorder () const
 Is this edge on the floor border?
bool intersectsSegment (const Floor *floor, const Math::Line3d &segment) const
 Does the segment intersect the edge in the 2D plane?
int32 getFaceIndex1 () const
int32 getFaceIndex2 () const
void enable (bool enable)
 Allow or disallow characters to path using this edge.
bool isEnabled () const
 Is pathing through this edge allowed for characters?
void saveLoad (ResourceSerializer *serializer)
 Save or restore the edge's status.

Private Member Functions

void addNeighboursFromFace (const FloorFace *face)

Static Private Member Functions

static bool intersectLine2d (const Math::Line3d &s1, const Math::Line3d &s2)

Private Attributes

uint16 _vertexIndex1
uint16 _vertexIndex2
Math::Vector3d _middle
int32 _faceIndex1
int32 _faceIndex2
bool _enabled
Common::Array< FloorEdge * > _neighbours

Detailed Description

A floor face (triangle) edge.

Used for path finding

Definition at line 52 of file floor.h.


Constructor & Destructor Documentation

Stark::Resources::FloorEdge::FloorEdge ( uint16  vertexIndex1,
uint16  vertexIndex2,
uint32  faceIndex1 
)

Definition at line 220 of file floor.cpp.


Member Function Documentation

void Stark::Resources::FloorEdge::addNeighboursFromFace ( const FloorFace face  )  [private]

Definition at line 260 of file floor.cpp.

void Stark::Resources::FloorEdge::buildNeighbours ( const Floor floor  ) 

Build a list of neighbour edges in the graph.

Definition at line 248 of file floor.cpp.

void Stark::Resources::FloorEdge::computeMiddle ( const Floor floor  ) 

Set the edge middle position.

Definition at line 269 of file floor.cpp.

float Stark::Resources::FloorEdge::costTo ( const FloorEdge other  )  const

Computes the cost for going to a neighbour edge.

This is used for pathfinding. The cost is equal to the distance between the middle of both edges

Definition at line 240 of file floor.cpp.

void Stark::Resources::FloorEdge::enable ( bool  enable  ) 

Allow or disallow characters to path using this edge.

Definition at line 323 of file floor.cpp.

int32 Stark::Resources::FloorEdge::getFaceIndex1 (  )  const

Definition at line 275 of file floor.cpp.

int32 Stark::Resources::FloorEdge::getFaceIndex2 (  )  const

Definition at line 279 of file floor.cpp.

Common::Array< FloorEdge * > Stark::Resources::FloorEdge::getNeighbours (  )  const

List the edge neighbour edges in the floor.

Definition at line 236 of file floor.cpp.

Math::Vector3d Stark::Resources::FloorEdge::getPosition (  )  const

Get the edge position.

This is the middle of the edge

Definition at line 244 of file floor.cpp.

bool Stark::Resources::FloorEdge::hasVertices ( uint16  vertexIndex1,
uint16  vertexIndex2 
) const

Check if the edge has the same vertices as the parameters.

Definition at line 228 of file floor.cpp.

bool Stark::Resources::FloorEdge::intersectLine2d ( const Math::Line3d s1,
const Math::Line3d s2 
) [static, private]

Definition at line 287 of file floor.cpp.

bool Stark::Resources::FloorEdge::intersectsSegment ( const Floor floor,
const Math::Line3d segment 
) const

Does the segment intersect the edge in the 2D plane?

Definition at line 315 of file floor.cpp.

bool Stark::Resources::FloorEdge::isEnabled (  )  const

Is pathing through this edge allowed for characters?

Definition at line 327 of file floor.cpp.

bool Stark::Resources::FloorEdge::isFloorBorder (  )  const

Is this edge on the floor border?

Definition at line 283 of file floor.cpp.

void Stark::Resources::FloorEdge::saveLoad ( ResourceSerializer serializer  ) 

Save or restore the edge's status.

Definition at line 331 of file floor.cpp.

void Stark::Resources::FloorEdge::setOtherFace ( uint32  faceIndex  ) 

Set the edge's second face.

Definition at line 232 of file floor.cpp.


Member Data Documentation

Definition at line 114 of file floor.h.

Definition at line 111 of file floor.h.

Definition at line 112 of file floor.h.

Definition at line 110 of file floor.h.

Definition at line 108 of file floor.h.

Definition at line 109 of file floor.h.


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


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