Nebula
Loading...
Searching...
No Matches
Math::plane Class Reference

#include <plane.h>

Detailed Description

A mathematical plane represented by a normal and a distance from origin.

Public Member Functions

 plane ()=default
 default constructor, NOTE: does NOT setup components!
 
 plane (scalar a, scalar b, scalar c, scalar d)
 construct from values
 
 plane (const point &p, const vector &n)
 setup from point and normal
 
 plane (const point &p0, const point &p1, const point &p2)
 setup from points
 
 plane (const __m128 &rhs)
 construct from SSE 128 byte float array
 
bool intersect (line const &line, point &outIntersectPoint)
 check intersection against line
 
vector get_normal () const
 get normal from plane
 
void set (scalar a, scalar b, scalar c, scalar d)
 set content
 

Public Attributes

union { 
 
   __m128   vec 
 
   struct { 
 
      float   a 
 
      float   b 
 
      float   c 
 
      float   d 
 
   }  
 
};  
 

Constructor & Destructor Documentation

◆ plane() [1/5]

Math::plane::plane ( )
default

default constructor, NOTE: does NOT setup components!

◆ plane() [2/5]

__forceinline Math::plane::plane ( scalar a,
scalar b,
scalar c,
scalar d )

construct from values

◆ plane() [3/5]

__forceinline Math::plane::plane ( const point & p,
const vector & n )

setup from point and normal

◆ plane() [4/5]

__forceinline Math::plane::plane ( const point & p0,
const point & p1,
const point & p2 )

setup from points

◆ plane() [5/5]

__forceinline Math::plane::plane ( const __m128 & rhs)

construct from SSE 128 byte float array

Member Function Documentation

◆ get_normal()

__forceinline vector Math::plane::get_normal ( ) const

get normal from plane

◆ intersect()

__forceinline bool Math::plane::intersect ( line const & line,
point & outIntersectPoint )

check intersection against line

◆ set()

__forceinline void Math::plane::set ( scalar a,
scalar b,
scalar c,
scalar d )

set content

Member Data Documentation

◆ [union]

union { ... } Math::plane

◆ a

float Math::plane::a

◆ b

float Math::plane::b

◆ c

float Math::plane::c

◆ d

float Math::plane::d

◆ vec

__m128 Math::plane::vec

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