Maya 1.0
MayaPlane Class Reference

A simple plane with lines for locating objects in the MayaWidget. More...

#include <maya.h>

Public Member Functions

 MayaPlane (const Box2 &=Box2(10.0), const double &=0.0, const double &=1.0)
 Create the plane.
 
 ~MayaPlane ()
 Destructor.
 
double Z () const
 Return the height.
 
Box2 GetArea () const
 Return the rectangular area.
 
void SetArea (const Box2 &)
 Define the rectangular area.
 
void Translate (const double &)
 Translate the plane.
 
bool Intersect (const Ray &, double &) const
 Intersect a ray with the plane.
 
void Render ()
 Render the horizontal plane.
 

Protected Member Functions

void InitRenderer ()
 Initialize the renderers.
 

Protected Attributes

Box2 area = Box2::Unit
 Area of the grid.
 
double height = 0.0
 Elevation.
 
double line = 1.0
 Line interval.
 
MayaSimpleRenderer * planeRendererWhiteLine = nullptr
 Renderer used to draw the white line of the plane.
 
MayaSimpleRenderer * planeRendererQuad = nullptr
 Renderer used to draw the transparent quad of the plane.
 

Detailed Description

A simple plane with lines for locating objects in the MayaWidget.

Constructor & Destructor Documentation

◆ MayaPlane()

MayaPlane::MayaPlane ( const Box2 & box = Box2(10.0),
const double & z = 0.0,
const double & l = 1.0 )
explicit

Create the plane.

Parameters
boxRectangle.
zElevation.
lDistance between lines.

References area, height, and line.

Member Function Documentation

◆ Intersect()

bool MayaPlane::Intersect ( const Ray & ray,
double & t ) const

Intersect a ray with the plane.

Parameters
rayThe ray.
tReturned intersection depth.

References area, height, and Plane::Intersect().

◆ SetArea()

void MayaPlane::SetArea ( const Box2 & r)

Define the rectangular area.

Parameters
rRectangle area.

References area.

◆ Translate()

void MayaPlane::Translate ( const double & t)

Translate the plane.

Parameters
tTranslation along z axis.

References height.