cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Plane Class Reference

#include <CCPlane.h>

Public Member Functions

 Plane (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3)
 create plane from tree point. More...
 
 Plane ( local p1, local p2, local p3)
 create plane from tree point. More...
 
 Plane (const Vec3 &normal, float dist)
 create plane from normal and dist. More...
 
 Plane ( local normal, local dist)
 create plane from normal and dist. More...
 
 Plane (const Vec3 &normal, const Vec3 &point)
 create plane from normal and a point on plane. More...
 
 Plane ( local normal, local point)
 create plane from normal and a point on plane. More...
 
 Plane ()
 create a default plan whose normal is (0, 0, 1), and _dist is 0, xoy plan in fact. More...
 
void initPlane (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3)
 init plane from tree point. More...
 
local initPlane ( local p1, local p2, local p3)
 init plane from tree point. More...
 
void initPlane (const Vec3 &normal, float dist)
 init plane from normal and dist. More...
 
void initPlane (const Vec3 &normal, const Vec3 &point)
 init plane from normal and a point on plane. More...
 
local initPlane ( local normal, local point)
 init plane from normal and a point on plane. More...
 
float dist2Plane (const Vec3 &p) const
 dist to plane, > 0 normal direction More...
 
local dist2Plane ( local p)
 dist to plane, > 0 normal direction More...
 
const Vec3getNormal () const
 Gets the plane's normal. More...
 
float getDist () const
 Gets the plane's distance to the origin along its normal. More...
 
local getDist ()
 Gets the plane's distance to the origin along its normal. More...
 
PointSide getSide (const Vec3 &point) const
 Return the side where the point is. More...
 
local getSide ( local point)
 Return the side where the point is. More...
 

Protected Attributes

Vec3 _normal
float _dist
local _dist

Constructor & Destructor Documentation

Plane ( const Vec3 p1,
const Vec3 p2,
const Vec3 p3 
)

create plane from tree point.

local Plane ( local  p1,
local  p2,
local  p3 
)

create plane from tree point.

Plane ( const Vec3 normal,
float  dist 
)

create plane from normal and dist.

local Plane ( local  normal,
local  dist 
)

create plane from normal and dist.

Plane ( const Vec3 normal,
const Vec3 point 
)

create plane from normal and a point on plane.

local Plane ( local  normal,
local  point 
)

create plane from normal and a point on plane.

Plane ( )

create a default plan whose normal is (0, 0, 1), and _dist is 0, xoy plan in fact.

local Plane ( )

create a default plan whose normal is (0, 0, 1), and _dist is 0, xoy plan in fact.

Member Function Documentation

float dist2Plane ( const Vec3 p) const

dist to plane, > 0 normal direction

local dist2Plane ( local  p)

dist to plane, > 0 normal direction

float getDist ( ) const
inline

Gets the plane's distance to the origin along its normal.

local getDist ( )
inline

Gets the plane's distance to the origin along its normal.

const Vec3& getNormal ( ) const
inline

Gets the plane's normal.

local getNormal ( )
inline

Gets the plane's normal.

PointSide getSide ( const Vec3 point) const

Return the side where the point is.

local getSide ( local  point)

Return the side where the point is.

void initPlane ( const Vec3 p1,
const Vec3 p2,
const Vec3 p3 
)

init plane from tree point.

local initPlane ( local  p1,
local  p2,
local  p3 
)

init plane from tree point.

void initPlane ( const Vec3 normal,
float  dist 
)

init plane from normal and dist.

local initPlane ( local  normal,
local  dist 
)

init plane from normal and dist.

void initPlane ( const Vec3 normal,
const Vec3 point 
)

init plane from normal and a point on plane.

local initPlane ( local  normal,
local  point 
)

init plane from normal and a point on plane.

Member Data Documentation

float _dist
protected
local _dist
protected
Vec3 _normal
protected
local _normal
protected

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