MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mxvk::Plane3D Struct Reference

Plane represented by a point and a normal vector. More...

#include <mxvk/include/mxvk/mxvk_math.h>

Public Member Functions

 Plane3D ()=default
 Construct an uninitialized plane.
 Plane3D ()=default
 Construct an uninitialized plane.
 Plane3D (const vec3D &point, const vec3D &normal)
 Construct from a point and normal vector.
 Plane3D (const vec3D &point, const vec3D &normal)
 Construct from a point and normal vector.
void Set (const vec3D &point, const vec3D &normal, bool normalize)
 Set the plane point and normal, optionally normalizing the normal.
void Set (const vec3D &point, const vec3D &normal, bool normalize)
 Set the plane point and normal, optionally normalizing the normal.

Public Attributes

vec3D p0
 Point on the plane.
vec3D v
 Plane normal.

Detailed Description

Plane represented by a point and a normal vector.

Definition at line 991 of file mxvk_math.h.

Constructor & Destructor Documentation

◆ Plane3D() [1/4]

mxvk::Plane3D::Plane3D ( )
default

Construct an uninitialized plane.

◆ Plane3D() [2/4]

mxvk::Plane3D::Plane3D ( const vec3D & point,
const vec3D & normal )
inline

Construct from a point and normal vector.

Definition at line 1002 of file mxvk_math.h.

1002: p0(point), v(normal) {}
vec3D p0
Point on the plane.
Definition mxvk_math.h:993
vec3D v
Plane normal.
Definition mxvk_math.h:996

◆ Plane3D() [3/4]

mxvk::Plane3D::Plane3D ( )
default

Construct an uninitialized plane.

◆ Plane3D() [4/4]

mxvk::Plane3D::Plane3D ( const vec3D & point,
const vec3D & normal )
inline

Construct from a point and normal vector.

Definition at line 968 of file mxvk_math_eigen.hpp.

968: p0(point), v(normal) {}

Member Function Documentation

◆ Set() [1/2]

void mxvk::Plane3D::Set ( const vec3D & point,
const vec3D & normal,
bool normalize )
inline

Set the plane point and normal, optionally normalizing the normal.

Definition at line 1005 of file mxvk_math.h.

1005 {
1006 p0 = point;
1007 v = normal;
1008 if (normalize) {
1009 v.Normalize();
1010 }
1011 }
void Normalize()
Normalize this vector in place, or reset it to zero if it is too short.
Definition mxvk_math.h:327

◆ Set() [2/2]

void mxvk::Plane3D::Set ( const vec3D & point,
const vec3D & normal,
bool normalize )
inline

Set the plane point and normal, optionally normalizing the normal.

Definition at line 971 of file mxvk_math_eigen.hpp.

971 {
972 p0 = point;
973 v = normal;
974 if (normalize) {
975 v.Normalize();
976 }
977 }

Member Data Documentation

◆ p0

vec3D mxvk::Plane3D::p0

Point on the plane.

Definition at line 993 of file mxvk_math.h.

◆ v

vec3D mxvk::Plane3D::v

Plane normal.

Definition at line 996 of file mxvk_math.h.


The documentation for this struct was generated from the following files: