Added functions to query and traverse using GraphCoords.
This commit is contained in:
parent
55d21880ec
commit
2db8b1f9e9
5 changed files with 307 additions and 13 deletions
|
@ -89,10 +89,17 @@ pub trait RailSegment {
|
|||
*/
|
||||
fn sample_up_vector(&self, index: usize, offset: f32) -> Result<Vector3, Error>;
|
||||
|
||||
/** Check if a subsegment is valid.
|
||||
*/
|
||||
fn has_subsegment(&self, index: usize) -> bool;
|
||||
|
||||
// endpoint functions
|
||||
|
||||
/** Get the segment index associated with an endpoint. */
|
||||
fn segment_from_endpoint(&self, endpoint: usize) -> Result<usize, Error>;
|
||||
fn subsegment_from_endpoint(&self, endpoint: usize) -> Result<usize, Error>;
|
||||
|
||||
/** Get the segment index associated with an endpoint. */
|
||||
fn endpoint_from_subsegment(&self, index: usize, is_upper: bool) -> Result<usize, Error>;
|
||||
|
||||
/** Get the location of an endpoint. */
|
||||
fn get_endpoint_transform(&self, endpoint: usize) -> Result<Transform3D, Error>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue