Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
LineSegClass Class Reference

#include <lineseg.h>

Public Member Functions

 LineSegClass (void)
 
 LineSegClass (const Vector3 &p0, const Vector3 &p1)
 
 LineSegClass (const LineSegClass &that, const Matrix3D &tm)
 
void Set (const Vector3 &p0, const Vector3 &p1)
 
void Set (const LineSegClass &that, const Matrix3D &tm)
 
void Set_Random (const Vector3 &min, const Vector3 &max)
 
const Vector3Get_P0 () const
 
const Vector3Get_P1 () const
 
const Vector3Get_DP () const
 
const Vector3Get_Dir () const
 
float Get_Length () const
 
void Compute_Point (float t, Vector3 *set) const
 
Vector3 Find_Point_Closest_To (const Vector3 &pos) const
 
bool Find_Intersection (const LineSegClass &other_line, Vector3 *p1, float *fraction1, Vector3 *p2, float *fraction2) const
 

Protected Member Functions

void recalculate (void)
 

Protected Attributes

Vector3 P0
 
Vector3 P1
 
Vector3 DP
 
Vector3 Dir
 
float Length
 

Detailed Description

Definition at line 57 of file lineseg.h.

Constructor & Destructor Documentation

◆ LineSegClass() [1/3]

LineSegClass::LineSegClass ( void )
inline

Definition at line 62 of file lineseg.h.

◆ LineSegClass() [2/3]

LineSegClass::LineSegClass ( const Vector3 & p0,
const Vector3 & p1 )
inline

Definition at line 63 of file lineseg.h.

◆ LineSegClass() [3/3]

LineSegClass::LineSegClass ( const LineSegClass & that,
const Matrix3D & tm )
inline

Definition at line 64 of file lineseg.h.

Member Function Documentation

◆ Compute_Point()

void LineSegClass::Compute_Point ( float t,
Vector3 * set ) const
inline

Definition at line 76 of file lineseg.h.

◆ Find_Intersection()

bool LineSegClass::Find_Intersection ( const LineSegClass & other_line,
Vector3 * p1,
float * fraction1,
Vector3 * p2,
float * fraction2 ) const

Definition at line 166 of file lineseg.cpp.

◆ Find_Point_Closest_To()

Vector3 LineSegClass::Find_Point_Closest_To ( const Vector3 & pos) const

Definition at line 133 of file lineseg.cpp.

◆ Get_Dir()

const Vector3 & LineSegClass::Get_Dir ( ) const
inline

Definition at line 73 of file lineseg.h.

◆ Get_DP()

const Vector3 & LineSegClass::Get_DP ( ) const
inline

Definition at line 72 of file lineseg.h.

◆ Get_Length()

float LineSegClass::Get_Length ( ) const
inline

Definition at line 74 of file lineseg.h.

◆ Get_P0()

const Vector3 & LineSegClass::Get_P0 ( ) const
inline

Definition at line 70 of file lineseg.h.

◆ Get_P1()

const Vector3 & LineSegClass::Get_P1 ( ) const
inline

Definition at line 71 of file lineseg.h.

◆ recalculate()

void LineSegClass::recalculate ( void )
inlineprotected

Definition at line 83 of file lineseg.h.

◆ Set() [1/2]

void LineSegClass::Set ( const LineSegClass & that,
const Matrix3D & tm )

Definition at line 58 of file lineseg.cpp.

◆ Set() [2/2]

void LineSegClass::Set ( const Vector3 & p0,
const Vector3 & p1 )
inline

Definition at line 66 of file lineseg.h.

◆ Set_Random()

void LineSegClass::Set_Random ( const Vector3 & min,
const Vector3 & max )

Definition at line 94 of file lineseg.cpp.

Member Data Documentation

◆ Dir

Vector3 LineSegClass::Dir
protected

Definition at line 88 of file lineseg.h.

◆ DP

Vector3 LineSegClass::DP
protected

Definition at line 87 of file lineseg.h.

◆ Length

float LineSegClass::Length
protected

Definition at line 89 of file lineseg.h.

◆ P0

Vector3 LineSegClass::P0
protected

Definition at line 85 of file lineseg.h.

◆ P1

Vector3 LineSegClass::P1
protected

Definition at line 86 of file lineseg.h.


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