Hermes
transform.h File Reference

Geometric transform classes. More...

Go to the source code of this file.

Classes

class  hermes::Transform2
 Represents a 2-dimensional transformation. More...
 
class  hermes::Transform
 Represents a 3-dimensional transformation. More...
 

Enumerations

enum class  hermes::transform_options {
  none = 0x0 , x_right = 0x1 , y_right = 0x2 , z_right = 0x4 ,
  left_handed = 0x8 , x_left = 0x10 , y_left = 0x20 , z_left = 0x40 ,
  right_handed = 0x80 , x_up = 0x100 , y_up = 0x200 , z_up = 0x400 ,
  zero_to_one = 0x800 , x_down = 0x1000 , y_down = 0x2000 , z_down = 0x4000 ,
  transpose = 0x8000 , flip_x = 0x10000 , flip_y = 0x20000 , flip_z = 0x40000
}
 Options for transform functions. More...
 

Functions

 hermes::HERMES_ENABLE_BITMASK_OPERATORS (transform_options)
 
HERMES_DEVICE_CALLABLE Transform hermes::inverse (const Transform &t)
 Computes inverse of a given transform. More...
 
Transform2 hermes::inverse (const Transform2 &t)
 Computes inverse of a given transform. More...
 
template<typename T >
std::ostream & hermes::operator<< (std::ostream &os, const Transform2 &m)
 Transform2 support for std::ostream << operator. More...
 
template<typename T >
std::ostream & hermes::operator<< (std::ostream &os, const Transform &m)
 Transform3 support for std::ostream << operator. More...
 

Detailed Description

Geometric transform classes.

Copyright (c) 2018, FilipeCN.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
FilipeCN (filip.nosp@m.edec.nosp@m.n@gma.nosp@m.il.c.nosp@m.om)
Date
2018-08-19

Enumeration Type Documentation

◆ transform_options

Options for transform functions.

Note
You can use bitwise operators to combine these options
Enumerator
none 

default behaviour

x_right 

set x-axis to right

y_right 

set y-axis to right

z_right 

set z-axis to right

left_handed 

use left-handed coordinate system

x_left 

set x-axis to left

y_left 

set y-axis to left

z_left 

set z-axis to left

right_handed 

use right-handed coordinate system

x_up 

set x-axis to up

y_up 

set y-axis to up

z_up 

set z-axis to up

zero_to_one 

maps projection range to [0,1], instead of [-1,1]

x_down 

set x-axis to down

y_down 

set y-axis to down

z_down 

set z-axis to down

transpose 

transpose transformation matrix

flip_x 

invert x-axis

flip_y 

invert y-axis

flip_z 

invert z-axis

Function Documentation

◆ inverse() [1/2]

HERMES_DEVICE_CALLABLE Transform hermes::inverse ( const Transform t)

Computes inverse of a given transform.

Parameters
t
Returns

◆ inverse() [2/2]

Transform2 hermes::inverse ( const Transform2 t)

Computes inverse of a given transform.

Gets inverse transform from t.

Parameters
t
Returns

◆ operator<<() [1/2]

template<typename T >
std::ostream& hermes::operator<< ( std::ostream &  os,
const Transform m 
)

Transform3 support for std::ostream << operator.

Template Parameters
T
Parameters
os
m
Returns

◆ operator<<() [2/2]

template<typename T >
std::ostream& hermes::operator<< ( std::ostream &  os,
const Transform2 m 
)

Transform2 support for std::ostream << operator.

Template Parameters
T
Parameters
os
m
Returns