载入中...
搜索中...
未找到
eve::card::CardPlaneMapper类 参考

Maps a logical card canvas to a 3D parallelogram without depending on graphics. 更多...

#include <Card.h>

Public 成员函数

void setLogicalRect (float x, float y, float width, float height)
 Configure the logical rectangle represented by the world plane.
 
void setPlane (float ox, float oy, float oz, float ux, float uy, float uz, float vx, float vy, float vz)
 Configure world origin plus full-width U and full-height V vectors.
 
bool mapRay (float ox, float oy, float oz, float dx, float dy, float dz)
 Intersect a world ray and store its logical and world hit coordinates.
 
bool mapLayout (float x, float y)
 Map a logical point to the configured world plane.
 
eve::Result< void > mapCardPose (float x, float y, float layoutAngleDeg, float flipProgress, float liftPeak, int flipAxis)
 Map a card's logical center into a lifted/flipped world pose on the plane.
 
float getLogicalX () const
 Return the most recently mapped logical X coordinate.
 
float getLogicalY () const
 Return the most recently mapped logical Y coordinate.
 
float getWorldX () const
 Return the most recently mapped world X coordinate.
 
float getWorldY () const
 Return the most recently mapped world Y coordinate.
 
float getWorldZ () const
 Return the most recently mapped world Z coordinate.
 
float getBasisUX () const
 Local card right axis after layout rotation and flip (world space).
 
float getBasisUY () const
 Basis U Y.
 
float getBasisUZ () const
 Basis U Z.
 
float getBasisVX () const
 Local card up axis after layout rotation and flip (world space).
 
float getBasisVY () const
 Basis V Y.
 
float getBasisVZ () const
 Basis V Z.
 
float getBasisNX () const
 Card facing normal after flip (world space).
 
float getBasisNY () const
 Basis N Y.
 
float getBasisNZ () const
 Basis N Z.
 
bool isShowingFront () const
 Whether the most recent mapCardPose should bind the front face.
 

详细描述

Maps a logical card canvas to a 3D parallelogram without depending on graphics.

在文件 Card.h 第 72 行定义.

成员函数说明

◆ getBasisNX()

float eve::card::CardPlaneMapper::getBasisNX ( ) const
inline

Card facing normal after flip (world space).

在文件 Card.h 第 120 行定义.

◆ getBasisNY()

float eve::card::CardPlaneMapper::getBasisNY ( ) const
inline

Basis N Y.

在文件 Card.h 第 122 行定义.

◆ getBasisNZ()

float eve::card::CardPlaneMapper::getBasisNZ ( ) const
inline

Basis N Z.

在文件 Card.h 第 124 行定义.

◆ getBasisUX()

float eve::card::CardPlaneMapper::getBasisUX ( ) const
inline

Local card right axis after layout rotation and flip (world space).

在文件 Card.h 第 108 行定义.

◆ getBasisUY()

float eve::card::CardPlaneMapper::getBasisUY ( ) const
inline

Basis U Y.

在文件 Card.h 第 110 行定义.

◆ getBasisUZ()

float eve::card::CardPlaneMapper::getBasisUZ ( ) const
inline

Basis U Z.

在文件 Card.h 第 112 行定义.

◆ getBasisVX()

float eve::card::CardPlaneMapper::getBasisVX ( ) const
inline

Local card up axis after layout rotation and flip (world space).

在文件 Card.h 第 114 行定义.

◆ getBasisVY()

float eve::card::CardPlaneMapper::getBasisVY ( ) const
inline

Basis V Y.

在文件 Card.h 第 116 行定义.

◆ getBasisVZ()

float eve::card::CardPlaneMapper::getBasisVZ ( ) const
inline

Basis V Z.

在文件 Card.h 第 118 行定义.

◆ getLogicalX()

float eve::card::CardPlaneMapper::getLogicalX ( ) const
inline

Return the most recently mapped logical X coordinate.

在文件 Card.h 第 98 行定义.

◆ getLogicalY()

float eve::card::CardPlaneMapper::getLogicalY ( ) const
inline

Return the most recently mapped logical Y coordinate.

在文件 Card.h 第 100 行定义.

◆ getWorldX()

float eve::card::CardPlaneMapper::getWorldX ( ) const
inline

Return the most recently mapped world X coordinate.

在文件 Card.h 第 102 行定义.

◆ getWorldY()

float eve::card::CardPlaneMapper::getWorldY ( ) const
inline

Return the most recently mapped world Y coordinate.

在文件 Card.h 第 104 行定义.

◆ getWorldZ()

float eve::card::CardPlaneMapper::getWorldZ ( ) const
inline

Return the most recently mapped world Z coordinate.

在文件 Card.h 第 106 行定义.

◆ isShowingFront()

bool eve::card::CardPlaneMapper::isShowingFront ( ) const
inline

Whether the most recent mapCardPose should bind the front face.

在文件 Card.h 第 126 行定义.

◆ mapCardPose()

eve::Result< void > eve::card::CardPlaneMapper::mapCardPose ( float  x,
float  y,
float  layoutAngleDeg,
float  flipProgress,
float  liftPeak,
int  flipAxis 
)

Map a card's logical center into a lifted/flipped world pose on the plane.

参数
xLogical center X.
yLogical center Y.
layoutAngleDegIn-plane rotation (Hand fan angle), degrees.
flipProgressAnimated face-down amount in [0, 1].
liftPeakPeak rise along the plane normal at the edge-on midpoint.
flipAxis0 = rotate about local up (width foreshortens), 1 = about local right.
返回
Success with cached world position and orthonormal basis U/V/N, or InvalidArgument when the logical rect or plane axes degenerate.
备注
Synchronous owner-thread query; does not allocate. Read getters after success.

在文件 Card.cpp 第 74 行定义.

引用了 eve::Diagnostic::error(), eve::card::evaluateCardFlip(), eve::Result< T >::failure(), eve::InvalidArgument, mapLayout(), n, pose, eve::Result< T >::success(), u, v, x , 以及 y.

◆ mapLayout()

bool eve::card::CardPlaneMapper::mapLayout ( float  x,
float  y 
)

Map a logical point to the configured world plane.

在文件 Card.cpp 第 64 行定义.

引用了 u, v, x , 以及 y.

被这些函数引用 mapCardPose().

◆ mapRay()

bool eve::card::CardPlaneMapper::mapRay ( float  ox,
float  oy,
float  oz,
float  dx,
float  dy,
float  dz 
)

Intersect a world ray and store its logical and world hit coordinates.

在文件 Card.cpp 第 40 行定义.

引用了 direction, dx, dy, dz, normal, ox, oy, relative, t, u, uv , 以及 v.

◆ setLogicalRect()

void eve::card::CardPlaneMapper::setLogicalRect ( float  x,
float  y,
float  width,
float  height 
)

Configure the logical rectangle represented by the world plane.

在文件 Card.cpp 第 26 行定义.

引用了 height, width, x , 以及 y.

◆ setPlane()

void eve::card::CardPlaneMapper::setPlane ( float  ox,
float  oy,
float  oz,
float  ux,
float  uy,
float  uz,
float  vx,
float  vy,
float  vz 
)

Configure world origin plus full-width U and full-height V vectors.

在文件 Card.cpp 第 33 行定义.

引用了 ox, oy, vx, vy , 以及 vz.


该类的文档由以下文件生成: