Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Member Functions | List of all members
Procedural::Line2D Class Reference

Represents a line in 2D. More...

#include <ProceduralGeometryHelpers.h>

Public Member Functions

 Line2D ()
 
 Line2D (Ogre::Vector2 point, Ogre::Vector2 direction)
 Contructor with arguments. More...
 
void setFrom2Points (const Ogre::Vector2 &a, const Ogre::Vector2 &b)
 Builds the line between 2 points. More...
 
bool findIntersect (const Line2D &other, Ogre::Vector2 &intersection) const
 Computes the interesction between current segment and another segment. More...
 

Detailed Description

Represents a line in 2D.

Constructor & Destructor Documentation

◆ Line2D() [1/2]

Procedural::Line2D::Line2D ( )

◆ Line2D() [2/2]

Procedural::Line2D::Line2D ( Ogre::Vector2  point,
Ogre::Vector2  direction 
)

Contructor with arguments.

Parameters
pointa point on the line
directiona normalized vector representing the direction of that line

Member Function Documentation

◆ findIntersect()

bool Procedural::Line2D::findIntersect ( const Line2D other,
Ogre::Vector2 intersection 
) const

Computes the interesction between current segment and another segment.

Parameters
otherthe other segment
intersectionthe point of intersection if outputed there if it exists
Returns
true if segments intersect, false otherwise

◆ setFrom2Points()

void Procedural::Line2D::setFrom2Points ( const Ogre::Vector2 a,
const Ogre::Vector2 b 
)

Builds the line between 2 points.


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