MXVK Vulkan Framework 0.24.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 1113 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 1124 of file mxvk_math.h.

1124: p0(point), v(normal) {}
vec3D p0
Point on the plane.
Definition mxvk_math.h:1115
vec3D v
Plane normal.
Definition mxvk_math.h:1118

◆ 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 1124 of file mxvk_math_eigen.hpp.

1124: 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 1127 of file mxvk_math.h.

1127 {
1128 p0 = point;
1129 v = normal;
1130 if (normalize) {
1131 v.Normalize();
1132 }
1133 }

◆ 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 1127 of file mxvk_math_eigen.hpp.

1127 {
1128 p0 = point;
1129 v = normal;
1130 if (normalize) {
1131 v.Normalize();
1132 }
1133 }

Member Data Documentation

◆ p0

vec3D mxvk::Plane3D::p0

Point on the plane.

Definition at line 1115 of file mxvk_math.h.

◆ v

vec3D mxvk::Plane3D::v

Plane normal.

Definition at line 1118 of file mxvk_math.h.


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