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

#include <ProceduralMultiShape.h>

Public Member Functions

 MultiShape ()
 Default constructor. More...
 
 MultiShape (const Shape &shape)
 Constructor from a single shape. More...
 
 MultiShape (int count,...)
 Constructor from a variable number of shapes. More...
 
MultiShapeaddShape (const Shape &shape)
 Adds a shape to the list of shapes. More...
 
void clear ()
 Clears all the content. More...
 
const ShapegetShape (unsigned int i) const
 Returns the i-th shape. More...
 
ShapegetShape (unsigned int i)
 Returns the i-th shape. More...
 
std::vector< Ogre::Vector2getPoints () const
 Builds an aggregated list of all points contained in all shapes. More...
 
unsigned int getShapeCount () const
 Returns the number of shapes in that MultiShape. More...
 
void addMultiShape (const MultiShape &other)
 Append every shape of an other multishape to the current multiShape. More...
 
Ogre::MeshPtr realizeMesh (const std::string &name="")
 Outputs the Multi Shape to a Mesh, mostly for visualisation or debugging purposes. More...
 
bool isPointInside (const Ogre::Vector2 &point) const
 Tells whether a point is located inside that multishape It assumes that all of the shapes in that multishape are closed, and that they don't contradict each other, ie a point cannot be outside and inside at the same time. More...
 
bool isClosed () const
 Tells whether multishape is "closed" or not. More...
 
void close ()
 Closes all shapes included in this multiShape. More...
 
bool isOutsideRealOutside () const
 Determines whether the outside as defined by user equals "real" outside. More...
 
void buildFromSegmentSoup (const std::vector< Segment2D > &segList)
 

Detailed Description

Holds a bunch of shapes. There are a number of assumptions that are made and are not checked against : the shapes must not cross each other

Constructor & Destructor Documentation

◆ MultiShape() [1/3]

Procedural::MultiShape::MultiShape ( )

Default constructor.

◆ MultiShape() [2/3]

Procedural::MultiShape::MultiShape ( const Shape shape)

Constructor from a single shape.

◆ MultiShape() [3/3]

Procedural::MultiShape::MultiShape ( int  count,
  ... 
)

Constructor from a variable number of shapes.

Parameters
countthe number of shapes to add
...pointer to the shapes to add

Member Function Documentation

◆ addMultiShape()

void Procedural::MultiShape::addMultiShape ( const MultiShape other)

Append every shape of an other multishape to the current multiShape.

Referenced by Procedural::Extruder::setMultiShapeToExtrude().

◆ addShape()

MultiShape& Procedural::MultiShape::addShape ( const Shape shape)

Adds a shape to the list of shapes.

Referenced by Procedural::Extruder::setShapeToExtrude().

◆ buildFromSegmentSoup()

void Procedural::MultiShape::buildFromSegmentSoup ( const std::vector< Segment2D > &  segList)

◆ clear()

void Procedural::MultiShape::clear ( )

◆ close()

void Procedural::MultiShape::close ( )

Closes all shapes included in this multiShape.

◆ getPoints()

std::vector<Ogre::Vector2> Procedural::MultiShape::getPoints ( ) const

Builds an aggregated list of all points contained in all shapes.

◆ getShape() [1/2]

Shape& Procedural::MultiShape::getShape ( unsigned int  i)

Returns the i-th shape.

◆ getShape() [2/2]

const Shape& Procedural::MultiShape::getShape ( unsigned int  i) const

Returns the i-th shape.

◆ getShapeCount()

unsigned int Procedural::MultiShape::getShapeCount ( ) const

Returns the number of shapes in that MultiShape.

◆ isClosed()

bool Procedural::MultiShape::isClosed ( ) const

Tells whether multishape is "closed" or not.

MultiShape is considered to be closed if and only if all shapes are closed

◆ isOutsideRealOutside()

bool Procedural::MultiShape::isOutsideRealOutside ( ) const

Determines whether the outside as defined by user equals "real" outside.

◆ isPointInside()

bool Procedural::MultiShape::isPointInside ( const Ogre::Vector2 point) const

Tells whether a point is located inside that multishape It assumes that all of the shapes in that multishape are closed, and that they don't contradict each other, ie a point cannot be outside and inside at the same time.

◆ realizeMesh()

Ogre::MeshPtr Procedural::MultiShape::realizeMesh ( const std::string &  name = "")

Outputs the Multi Shape to a Mesh, mostly for visualisation or debugging purposes.


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