diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..2d14473b41498e434e3cd5f1cc36f1842801fa29 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +/.idea/ +/work_dirs* +.vscode/ +/tmp +/data +/checkpoints +*.so +*.patch +__pycache__/ +*.egg-info/ +/viz* +/submit* +build/ +*.pyd +/cache* +*.stl +*.pth +/venv/ +.nk8s +*.mp4 +.vs +/exp/ +/dev/ diff --git a/README.md b/README.md index 789502cdb8c4e65934904f7231d238b475cc2ca9..b6732c5b1baf6f3b00813fd9b2ddcff301928a0b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ colorTo: green sdk: gradio sdk_version: 4.20.1 python_version: 3.10.13 -app_file: app_wrapper.py +app_file: app.py pinned: false license: mit short_description: Sparse-view SFM-free Gaussian Splatting in Seconds diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..6146da16af98ac387108517f9311f1b1b919305f --- /dev/null +++ b/app.py @@ -0,0 +1,277 @@ +import os, subprocess, shlex, sys, gc +import time +import torch +import numpy as np +import shutil +import argparse +import gradio as gr +import uuid +import spaces + +subprocess.run(shlex.split("pip install wheel/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl")) +subprocess.run(shlex.split("pip install wheel/simple_knn-0.0.0-cp310-cp310-linux_x86_64.whl")) +subprocess.run(shlex.split("pip install wheel/curope-0.0.0-cp310-cp310-linux_x86_64.whl")) + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +os.sys.path.append(os.path.abspath(os.path.join(BASE_DIR, "submodules", "dust3r"))) +# os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True' +from dust3r.inference import inference +from dust3r.model import AsymmetricCroCo3DStereo +from dust3r.utils.device import to_numpy +from dust3r.image_pairs import make_pairs +from dust3r.cloud_opt import global_aligner, GlobalAlignerMode +from utils.dust3r_utils import compute_global_alignment, load_images, storePly, save_colmap_cameras, save_colmap_images + +from argparse import ArgumentParser, Namespace +from arguments import ModelParams, PipelineParams, OptimizationParams +from train_joint import training +from render_by_interp import render_sets +GRADIO_CACHE_FOLDER = './gradio_cache_folder' +############################################################################################################################################# + + +def get_dust3r_args_parser(): + parser = argparse.ArgumentParser() + parser.add_argument("--image_size", type=int, default=512, choices=[512, 224], help="image size") + parser.add_argument("--model_path", type=str, default="submodules/dust3r/checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth", help="path to the model weights") + parser.add_argument("--device", type=str, default='cuda', help="pytorch device") + parser.add_argument("--batch_size", type=int, default=1) + parser.add_argument("--schedule", type=str, default='linear') + parser.add_argument("--lr", type=float, default=0.01) + parser.add_argument("--niter", type=int, default=300) + parser.add_argument("--focal_avg", type=bool, default=True) + parser.add_argument("--n_views", type=int, default=3) + parser.add_argument("--base_path", type=str, default=GRADIO_CACHE_FOLDER) + return parser + + +@spaces.GPU(duration=300) +def process(inputfiles, input_path=None): + + if input_path is not None: + imgs_path = './assets/example/' + input_path + imgs_names = sorted(os.listdir(imgs_path)) + + inputfiles = [] + for imgs_name in imgs_names: + file_path = os.path.join(imgs_path, imgs_name) + print(file_path) + inputfiles.append(file_path) + print(inputfiles) + + # ------ (1) Coarse Geometric Initialization ------ + # os.system(f"rm -rf {GRADIO_CACHE_FOLDER}") + parser = get_dust3r_args_parser() + opt = parser.parse_args() + + tmp_user_folder = str(uuid.uuid4()).replace("-", "") + opt.img_base_path = os.path.join(opt.base_path, tmp_user_folder) + img_folder_path = os.path.join(opt.img_base_path, "images") + + img_folder_path = os.path.join(opt.img_base_path, "images") + model = AsymmetricCroCo3DStereo.from_pretrained(opt.model_path).to(opt.device) + os.makedirs(img_folder_path, exist_ok=True) + + opt.n_views = len(inputfiles) + if opt.n_views == 1: + raise gr.Error("The number of input images should be greater than 1.") + print("Multiple images: ", inputfiles) + for image_path in inputfiles: + if input_path is not None: + shutil.copy(image_path, img_folder_path) + else: + shutil.move(image_path, img_folder_path) + train_img_list = sorted(os.listdir(img_folder_path)) + assert len(train_img_list)==opt.n_views, f"Number of images in the folder is not equal to {opt.n_views}" + images, ori_size, imgs_resolution = load_images(img_folder_path, size=512) + resolutions_are_equal = len(set(imgs_resolution)) == 1 + if resolutions_are_equal == False: + raise gr.Error("The resolution of the input image should be the same.") + print("ori_size", ori_size) + start_time = time.time() + ###################################################### + pairs = make_pairs(images, scene_graph='complete', prefilter=None, symmetrize=True) + output = inference(pairs, model, opt.device, batch_size=opt.batch_size) + output_colmap_path=img_folder_path.replace("images", "sparse/0") + os.makedirs(output_colmap_path, exist_ok=True) + + scene = global_aligner(output, device=opt.device, mode=GlobalAlignerMode.PointCloudOptimizer) + loss = compute_global_alignment(scene=scene, init="mst", niter=opt.niter, schedule=opt.schedule, lr=opt.lr, focal_avg=opt.focal_avg) + scene = scene.clean_pointcloud() + + imgs = to_numpy(scene.imgs) + focals = scene.get_focals() + poses = to_numpy(scene.get_im_poses()) + pts3d = to_numpy(scene.get_pts3d()) + scene.min_conf_thr = float(scene.conf_trf(torch.tensor(1.0))) + confidence_masks = to_numpy(scene.get_masks()) + intrinsics = to_numpy(scene.get_intrinsics()) + ###################################################### + end_time = time.time() + print(f"Time taken for {opt.n_views} views: {end_time-start_time} seconds") + save_colmap_cameras(ori_size, intrinsics, os.path.join(output_colmap_path, 'cameras.txt')) + save_colmap_images(poses, os.path.join(output_colmap_path, 'images.txt'), train_img_list) + pts_4_3dgs = np.concatenate([p[m] for p, m in zip(pts3d, confidence_masks)]) + color_4_3dgs = np.concatenate([p[m] for p, m in zip(imgs, confidence_masks)]) + color_4_3dgs = (color_4_3dgs * 255.0).astype(np.uint8) + storePly(os.path.join(output_colmap_path, "points3D.ply"), pts_4_3dgs, color_4_3dgs) + pts_4_3dgs_all = np.array(pts3d).reshape(-1, 3) + np.save(output_colmap_path + "/pts_4_3dgs_all.npy", pts_4_3dgs_all) + np.save(output_colmap_path + "/focal.npy", np.array(focals.cpu())) + + ### save VRAM + del scene + torch.cuda.empty_cache() + gc.collect() + ################################################################################################################################################## + + # ------ (2) Fast 3D-Gaussian Optimization ------ + parser = ArgumentParser(description="Training script parameters") + lp = ModelParams(parser) + op = OptimizationParams(parser) + pp = PipelineParams(parser) + parser.add_argument('--debug_from', type=int, default=-1) + parser.add_argument("--test_iterations", nargs="+", type=int, default=[]) + parser.add_argument("--save_iterations", nargs="+", type=int, default=[]) + parser.add_argument("--checkpoint_iterations", nargs="+", type=int, default=[]) + parser.add_argument("--start_checkpoint", type=str, default = None) + parser.add_argument("--scene", type=str, default="demo") + parser.add_argument("--n_views", type=int, default=3) + parser.add_argument("--get_video", action="store_true") + parser.add_argument("--optim_pose", type=bool, default=True) + parser.add_argument("--skip_train", action="store_true") + parser.add_argument("--skip_test", action="store_true") + args = parser.parse_args(sys.argv[1:]) + args.save_iterations.append(args.iterations) + args.model_path = opt.img_base_path + '/output/' + args.source_path = opt.img_base_path + # args.model_path = GRADIO_CACHE_FOLDER + '/output/' + # args.source_path = GRADIO_CACHE_FOLDER + args.iteration = 1000 + os.makedirs(args.model_path, exist_ok=True) + training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint, args.debug_from, args) + ################################################################################################################################################## + + # ------ (3) Render video by interpolation ------ + parser = ArgumentParser(description="Testing script parameters") + model = ModelParams(parser, sentinel=True) + pipeline = PipelineParams(parser) + args.eval = True + args.get_video = True + args.n_views = opt.n_views + render_sets( + model.extract(args), + args.iteration, + pipeline.extract(args), + args.skip_train, + args.skip_test, + args, + ) + output_ply_path = opt.img_base_path + f'/output/point_cloud/iteration_{args.iteration}/point_cloud.ply' + output_video_path = opt.img_base_path + f'/output/demo_{opt.n_views}_view.mp4' + # output_ply_path = GRADIO_CACHE_FOLDER+ f'/output/point_cloud/iteration_{args.iteration}/point_cloud.ply' + # output_video_path = GRADIO_CACHE_FOLDER+ f'/output/demo_{opt.n_views}_view.mp4' + + return output_video_path, output_ply_path, output_ply_path + ################################################################################################################################################## + + + +_TITLE = '''InstantSplat''' +_DESCRIPTION = ''' +
@Article{kerbl3Dgaussians,
+ author = {Kerbl, Bernhard and Kopanas, Georgios and Leimk{\"u}hler, Thomas and Drettakis, George},
+ title = {3D Gaussian Splatting for Real-Time Radiance Field Rendering},
+ journal = {ACM Transactions on Graphics},
+ number = {4},
+ volume = {42},
+ month = {July},
+ year = {2023},
+ url = {https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/}
+}
+ + |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_associated_min_max +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , typename U > | |
GLM_FUNC_DECL U | associatedMax (T x, U a, T y, U b) |
Maximum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< 2, U, Q > | associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b) |
Maximum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b) |
Maximum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b) |
Maximum comparison between 2 variables and returns 2 associated variable values. More... | |
template<typename T , typename U > | |
GLM_FUNC_DECL U | associatedMax (T x, U a, T y, U b, T z, U c) |
Maximum comparison between 3 variables and returns 3 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c) |
Maximum comparison between 3 variables and returns 3 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c) |
Maximum comparison between 3 variables and returns 3 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c) |
Maximum comparison between 3 variables and returns 3 associated variable values. More... | |
template<typename T , typename U > | |
GLM_FUNC_DECL U | associatedMax (T x, U a, T y, U b, T z, U c, T w, U d) |
Maximum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d) |
Maximum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d) |
Maximum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d) |
Maximum comparison between 4 variables and returns 4 associated variable values. More... | |
template<typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL U | associatedMin (T x, U a, T y, U b) |
Minimum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< 2, U, Q > | associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b) |
Minimum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (T x, const vec< L, U, Q > &a, T y, const vec< L, U, Q > &b) |
Minimum comparison between 2 variables and returns 2 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b) |
Minimum comparison between 2 variables and returns 2 associated variable values. More... | |
template<typename T , typename U > | |
GLM_FUNC_DECL U | associatedMin (T x, U a, T y, U b, T z, U c) |
Minimum comparison between 3 variables and returns 3 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c) |
Minimum comparison between 3 variables and returns 3 associated variable values. More... | |
template<typename T , typename U > | |
GLM_FUNC_DECL U | associatedMin (T x, U a, T y, U b, T z, U c, T w, U d) |
Minimum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d) |
Minimum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d) |
Minimum comparison between 4 variables and returns 4 associated variable values. More... | |
template<length_t L, typename T , typename U , qualifier Q> | |
GLM_FUNC_DECL vec< L, U, Q > | associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d) |
Minimum comparison between 4 variables and returns 4 associated variable values. More... | |
Definition in file associated_min_max.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | highestBitValue (genIUType Value) |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | highestBitValue (vec< L, T, Q > const &value) |
Find the highest bit set to 1 in a integer variable and return its value. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | lowestBitValue (genIUType Value) |
template<typename genIUType > | |
GLM_DEPRECATED GLM_FUNC_DECL genIUType | powerOfTwoAbove (genIUType Value) |
Return the power of two number which value is just higher the input value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > | powerOfTwoAbove (vec< L, T, Q > const &value) |
Return the power of two number which value is just higher the input value. More... | |
template<typename genIUType > | |
GLM_DEPRECATED GLM_FUNC_DECL genIUType | powerOfTwoBelow (genIUType Value) |
Return the power of two number which value is just lower the input value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > | powerOfTwoBelow (vec< L, T, Q > const &value) |
Return the power of two number which value is just lower the input value. More... | |
template<typename genIUType > | |
GLM_DEPRECATED GLM_FUNC_DECL genIUType | powerOfTwoNearest (genIUType Value) |
Return the power of two number which value is the closet to the input value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > | powerOfTwoNearest (vec< L, T, Q > const &value) |
Return the power of two number which value is the closet to the input value. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
GLM_FUNC_DECL glm::u8vec2 | bitfieldDeinterleave (glm::uint16 x) |
Deinterleaves the bits of x. More... | |
GLM_FUNC_DECL glm::u16vec2 | bitfieldDeinterleave (glm::uint32 x) |
Deinterleaves the bits of x. More... | |
GLM_FUNC_DECL glm::u32vec2 | bitfieldDeinterleave (glm::uint64 x) |
Deinterleaves the bits of x. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | bitfieldFillOne (genIUType Value, int FirstBit, int BitCount) |
Set to 1 a range of bits. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldFillOne (vec< L, T, Q > const &Value, int FirstBit, int BitCount) |
Set to 1 a range of bits. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | bitfieldFillZero (genIUType Value, int FirstBit, int BitCount) |
Set to 0 a range of bits. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldFillZero (vec< L, T, Q > const &Value, int FirstBit, int BitCount) |
Set to 0 a range of bits. More... | |
GLM_FUNC_DECL int16 | bitfieldInterleave (int8 x, int8 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint16 | bitfieldInterleave (uint8 x, uint8 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint16 | bitfieldInterleave (u8vec2 const &v) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL int32 | bitfieldInterleave (int16 x, int16 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint32 | bitfieldInterleave (uint16 x, uint16 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint32 | bitfieldInterleave (u16vec2 const &v) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL int64 | bitfieldInterleave (int32 x, int32 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint64 | bitfieldInterleave (uint32 x, uint32 y) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL uint64 | bitfieldInterleave (u32vec2 const &v) |
Interleaves the bits of x and y. More... | |
GLM_FUNC_DECL int32 | bitfieldInterleave (int8 x, int8 y, int8 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL uint32 | bitfieldInterleave (uint8 x, uint8 y, uint8 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL int64 | bitfieldInterleave (int16 x, int16 y, int16 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL uint64 | bitfieldInterleave (uint16 x, uint16 y, uint16 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL int64 | bitfieldInterleave (int32 x, int32 y, int32 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL uint64 | bitfieldInterleave (uint32 x, uint32 y, uint32 z) |
Interleaves the bits of x, y and z. More... | |
GLM_FUNC_DECL int32 | bitfieldInterleave (int8 x, int8 y, int8 z, int8 w) |
Interleaves the bits of x, y, z and w. More... | |
GLM_FUNC_DECL uint32 | bitfieldInterleave (uint8 x, uint8 y, uint8 z, uint8 w) |
Interleaves the bits of x, y, z and w. More... | |
GLM_FUNC_DECL int64 | bitfieldInterleave (int16 x, int16 y, int16 z, int16 w) |
Interleaves the bits of x, y, z and w. More... | |
GLM_FUNC_DECL uint64 | bitfieldInterleave (uint16 x, uint16 y, uint16 z, uint16 w) |
Interleaves the bits of x, y, z and w. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | bitfieldRotateLeft (genIUType In, int Shift) |
Rotate all bits to the left. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldRotateLeft (vec< L, T, Q > const &In, int Shift) |
Rotate all bits to the left. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | bitfieldRotateRight (genIUType In, int Shift) |
Rotate all bits to the right. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldRotateRight (vec< L, T, Q > const &In, int Shift) |
Rotate all bits to the right. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | mask (genIUType Bits) |
Build a mask of 'count' bits. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | mask (vec< L, T, Q > const &v) |
Build a mask of 'count' bits. More... | |
Definition in file bitfield.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_closest_point +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | closestPointOnLine (vec< 3, T, Q > const &point, vec< 3, T, Q > const &a, vec< 3, T, Q > const &b) |
Find the point on a straight line which is the closet of a point. More... | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 2, T, Q > | closestPointOnLine (vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b) |
2d lines work as well | |
Definition in file closest_point.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_color_encoding +More...
+ +Go to the source code of this file.
++Functions | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | convertD65XYZToD50XYZ (vec< 3, T, Q > const &ColorD65XYZ) |
Convert a D65 YUV color to D50 YUV. | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | convertD65XYZToLinearSRGB (vec< 3, T, Q > const &ColorD65XYZ) |
Convert a D65 YUV color to linear sRGB. | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | convertLinearSRGBToD50XYZ (vec< 3, T, Q > const &ColorLinearSRGB) |
Convert a linear sRGB color to D50 YUV. | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | convertLinearSRGBToD65XYZ (vec< 3, T, Q > const &ColorLinearSRGB) |
Convert a linear sRGB color to D65 YUV. | |
Definition in file color_encoding.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | convertLinearToSRGB (vec< L, T, Q > const &ColorLinear) |
Convert a linear color to sRGB color using a standard gamma correction. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma) |
Convert a linear color to sRGB color using a custom gamma correction. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB) |
Convert a sRGB color to linear color using a standard gamma correction. More... | |
+template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB, T Gamma) |
Convert a sRGB color to linear color using a custom gamma correction. | |
Definition in file gtc/color_space.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | hsvColor (vec< 3, T, Q > const &rgbValue) |
Converts a color from RGB color space to its color in HSV color space. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL T | luminosity (vec< 3, T, Q > const &color) |
Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | rgbColor (vec< 3, T, Q > const &hsvValue) |
Converts a color from HSV color space to its color in RGB color space. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | saturation (T const s) |
Build a saturation matrix. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | saturation (T const s, vec< 3, T, Q > const &color) |
Modify the saturation of a color. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 4, T, Q > | saturation (T const s, vec< 4, T, Q > const &color) |
Modify the saturation of a color. More... | |
Definition in file gtx/color_space.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_color_space_YCoCg +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | rgb2YCoCg (vec< 3, T, Q > const &rgbColor) |
Convert a color from RGB color space to YCoCg color space. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | rgb2YCoCgR (vec< 3, T, Q > const &rgbColor) |
Convert a color from RGB color space to YCoCgR color space. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | YCoCg2rgb (vec< 3, T, Q > const &YCoCgColor) |
Convert a color from YCoCg color space to RGB color space. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | YCoCgR2rgb (vec< 3, T, Q > const &YCoCgColor) |
Convert a color from YCoCgR color space to RGB color space. More... | |
Definition in file color_space_YCoCg.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | abs (genType x) |
Returns x if x >= 0; otherwise, it returns -x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | abs (vec< L, T, Q > const &x) |
Returns x if x >= 0; otherwise, it returns -x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | ceil (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer that is greater than or equal to x. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | clamp (genType x, genType minVal, genType maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | clamp (vec< L, T, Q > const &x, T minVal, T maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | clamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal. More... | |
GLM_FUNC_DECL int | floatBitsToInt (float const &v) |
Returns a signed integer value representing the encoding of a floating-point value. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, int, Q > | floatBitsToInt (vec< L, float, Q > const &v) |
Returns a signed integer value representing the encoding of a floating-point value. More... | |
GLM_FUNC_DECL uint | floatBitsToUint (float const &v) |
Returns a unsigned integer value representing the encoding of a floating-point value. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, uint, Q > | floatBitsToUint (vec< L, float, Q > const &v) |
Returns a unsigned integer value representing the encoding of a floating-point value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | floor (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer that is less then or equal to x. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fma (genType const &a, genType const &b, genType const &c) |
Computes and returns a * b + c. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fract (genType x) |
Return x - floor(x). More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fract (vec< L, T, Q > const &x) |
Return x - floor(x). More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | frexp (genType x, int &exp) |
Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two, such that: x = significand * exp(2, exponent) More... | |
GLM_FUNC_DECL float | intBitsToFloat (int const &v) |
Returns a floating-point value corresponding to a signed integer encoding of a floating-point value. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, float, Q > | intBitsToFloat (vec< L, int, Q > const &v) |
Returns a floating-point value corresponding to a signed integer encoding of a floating-point value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | isinf (vec< L, T, Q > const &x) |
Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | isnan (vec< L, T, Q > const &x) |
Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | ldexp (genType const &x, int const &exp) |
Builds a floating-point number from x and the corresponding integral exponent of two in exp, returning: significand * exp(2, exponent) More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | max (genType x, genType y) |
Returns y if x < y; otherwise, it returns x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | max (vec< L, T, Q > const &x, T y) |
Returns y if x < y; otherwise, it returns x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | max (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Returns y if x < y; otherwise, it returns x. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | min (genType x, genType y) |
Returns y if y < x; otherwise, it returns x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | min (vec< L, T, Q > const &x, T y) |
Returns y if y < x; otherwise, it returns x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > | min (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Returns y if y < x; otherwise, it returns x. More... | |
template<typename genTypeT , typename genTypeU > | |
GLM_FUNC_DECL genTypeT | mix (genTypeT x, genTypeT y, genTypeU a) |
If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | mod (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Modulus. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | modf (genType x, genType &i) |
Returns the fractional part of x and sets i to the integer part (as a whole number floating point value). More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | round (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer to x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | roundEven (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer to x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | sign (vec< L, T, Q > const &x) |
Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | smoothstep (genType edge0, genType edge1, genType x) |
Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | step (genType edge, genType x) |
Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | step (T edge, vec< L, T, Q > const &x) |
Returns 0.0 if x < edge, otherwise it returns 1.0. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | step (vec< L, T, Q > const &edge, vec< L, T, Q > const &x) |
Returns 0.0 if x < edge, otherwise it returns 1.0. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | trunc (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x. More... | |
GLM_FUNC_DECL float | uintBitsToFloat (uint const &v) |
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, float, Q > | uintBitsToFloat (vec< L, uint, Q > const &v) |
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value. More... | |
Definition in file common.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | closeBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max) |
Returns whether vector components values are within an interval. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fmod (vec< L, T, Q > const &v) |
Similar to 'mod' but with a different rounding and integer support. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType::bool_type | isdenormal (genType const &x) |
Returns true if x is a denormalized number Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | openBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max) |
Returns whether vector components values are within an interval. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_compatibility +More...
+ +Go to the source code of this file.
++Typedefs | |
+typedef bool | bool1 |
boolean type with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef bool | bool1x1 |
boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) | |
+typedef vec< 2, bool, highp > | bool2 |
boolean type with 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 2, bool, highp > | bool2x2 |
boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 3, bool, highp > | bool2x3 |
boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 4, bool, highp > | bool2x4 |
boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 3, bool, highp > | bool3 |
boolean type with 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 2, bool, highp > | bool3x2 |
boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 3, bool, highp > | bool3x3 |
boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 4, bool, highp > | bool3x4 |
boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 4, bool, highp > | bool4 |
boolean type with 4 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 2, bool, highp > | bool4x2 |
boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 3, bool, highp > | bool4x3 |
boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 4, bool, highp > | bool4x4 |
boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef double | double1 |
double-qualifier floating-point vector with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef double | double1x1 |
double-qualifier floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef vec< 2, double, highp > | double2 |
double-qualifier floating-point vector with 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 2, double, highp > | double2x2 |
double-qualifier floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 3, double, highp > | double2x3 |
double-qualifier floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 4, double, highp > | double2x4 |
double-qualifier floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 3, double, highp > | double3 |
double-qualifier floating-point vector with 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 2, double, highp > | double3x2 |
double-qualifier floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 3, double, highp > | double3x3 |
double-qualifier floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 4, double, highp > | double3x4 |
double-qualifier floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 4, double, highp > | double4 |
double-qualifier floating-point vector with 4 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 2, double, highp > | double4x2 |
double-qualifier floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 3, double, highp > | double4x3 |
double-qualifier floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 4, double, highp > | double4x4 |
double-qualifier floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef float | float1 |
single-qualifier floating-point vector with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef float | float1x1 |
single-qualifier floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef vec< 2, float, highp > | float2 |
single-qualifier floating-point vector with 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 2, float, highp > | float2x2 |
single-qualifier floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 3, float, highp > | float2x3 |
single-qualifier floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 4, float, highp > | float2x4 |
single-qualifier floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 3, float, highp > | float3 |
single-qualifier floating-point vector with 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 2, float, highp > | float3x2 |
single-qualifier floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 3, float, highp > | float3x3 |
single-qualifier floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 4, float, highp > | float3x4 |
single-qualifier floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 4, float, highp > | float4 |
single-qualifier floating-point vector with 4 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 2, float, highp > | float4x2 |
single-qualifier floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 3, float, highp > | float4x3 |
single-qualifier floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 4, float, highp > | float4x4 |
single-qualifier floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef int | int1 |
integer vector with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef int | int1x1 |
integer matrix with 1 component. (From GLM_GTX_compatibility extension) | |
+typedef vec< 2, int, highp > | int2 |
integer vector with 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 2, int, highp > | int2x2 |
integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 3, int, highp > | int2x3 |
integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 2, 4, int, highp > | int2x4 |
integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 3, int, highp > | int3 |
integer vector with 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 2, int, highp > | int3x2 |
integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 3, int, highp > | int3x3 |
integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 3, 4, int, highp > | int3x4 |
integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) | |
+typedef vec< 4, int, highp > | int4 |
integer vector with 4 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 2, int, highp > | int4x2 |
integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 3, int, highp > | int4x3 |
integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) | |
+typedef mat< 4, 4, int, highp > | int4x4 |
integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) | |
+Functions | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER T | atan2 (T x, T y) |
Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 2, T, Q > | atan2 (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y) |
Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 3, T, Q > | atan2 (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y) |
Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 4, T, Q > | atan2 (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y) |
Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) | |
+template<typename genType > | |
GLM_FUNC_DECL bool | isfinite (genType const &x) |
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 1, bool, Q > | isfinite (const vec< 1, T, Q > &x) |
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 2, bool, Q > | isfinite (const vec< 2, T, Q > &x) |
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, bool, Q > | isfinite (const vec< 3, T, Q > &x) |
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 4, bool, Q > | isfinite (const vec< 4, T, Q > &x) |
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) | |
+template<typename T > | |
GLM_FUNC_QUALIFIER T | lerp (T x, T y, T a) |
Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 2, T, Q > | lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, T a) |
Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 3, T, Q > | lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, T a) |
Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 4, T, Q > | lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, T a) |
Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 2, T, Q > | lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, const vec< 2, T, Q > &a) |
Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 3, T, Q > | lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, const vec< 3, T, Q > &a) |
Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 4, T, Q > | lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a) |
Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER T | saturate (T x) |
Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 2, T, Q > | saturate (const vec< 2, T, Q > &x) |
Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 3, T, Q > | saturate (const vec< 3, T, Q > &x) |
Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) | |
+template<typename T , qualifier Q> | |
GLM_FUNC_QUALIFIER vec< 4, T, Q > | saturate (const vec< 4, T, Q > &x) |
Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) | |
Definition in file compatibility.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_component_wise +More...
+ +Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType::value_type | compAdd (genType const &v) |
Add all vector components together. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType::value_type | compMax (genType const &v) |
Find the maximum value between single vector components. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType::value_type | compMin (genType const &v) |
Find the minimum value between single vector components. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType::value_type | compMul (genType const &v) |
Multiply all vector components together. More... | |
template<typename floatType , length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, floatType, Q > | compNormalize (vec< L, T, Q > const &v) |
Convert an integer vector to a normalized float vector. More... | |
template<length_t L, typename T , typename floatType , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | compScale (vec< L, floatType, Q > const &v) |
Convert a normalized float vector to an integer vector. More... | |
Definition in file component_wise.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | e () |
Return e constant. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | euler () |
Return Euler's constant. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | four_over_pi () |
Return 4 / pi. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | golden_ratio () |
Return the golden ratio constant. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | half_pi () |
Return pi / 2. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | ln_ln_two () |
Return ln(ln(2)). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | ln_ten () |
Return ln(10). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | ln_two () |
Return ln(2). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | one () |
Return 1. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | one_over_pi () |
Return 1 / pi. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | one_over_root_two () |
Return 1 / sqrt(2). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | one_over_two_pi () |
Return 1 / (pi * 2). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | quarter_pi () |
Return pi / 4. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_five () |
Return sqrt(5). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_half_pi () |
Return sqrt(pi / 2). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_ln_four () |
Return sqrt(ln(4)). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_pi () |
Return square root of pi. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_three () |
Return sqrt(3). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_two () |
Return sqrt(2). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | root_two_pi () |
Return sqrt(2 * pi). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | third () |
Return 1 / 3. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | three_over_two_pi () |
Return pi / 2 * 3. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | two_over_pi () |
Return 2 / pi. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | two_over_root_pi () |
Return 2 / sqrt(pi). More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | two_pi () |
Return pi * 2. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | two_thirds () |
Return 2 / 3. More... | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | zero () |
Return 0. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_dual_quaternion +More...
+ +Go to the source code of this file.
++Typedefs | |
typedef highp_ddualquat | ddualquat |
Dual-quaternion of default double-qualifier floating-point numbers. More... | |
typedef highp_fdualquat | dualquat |
Dual-quaternion of floating-point numbers. More... | |
typedef highp_fdualquat | fdualquat |
Dual-quaternion of single-qualifier floating-point numbers. More... | |
typedef tdualquat< double, highp > | highp_ddualquat |
Dual-quaternion of high double-qualifier floating-point numbers. More... | |
typedef tdualquat< float, highp > | highp_dualquat |
Dual-quaternion of high single-qualifier floating-point numbers. More... | |
typedef tdualquat< float, highp > | highp_fdualquat |
Dual-quaternion of high single-qualifier floating-point numbers. More... | |
typedef tdualquat< double, lowp > | lowp_ddualquat |
Dual-quaternion of low double-qualifier floating-point numbers. More... | |
typedef tdualquat< float, lowp > | lowp_dualquat |
Dual-quaternion of low single-qualifier floating-point numbers. More... | |
typedef tdualquat< float, lowp > | lowp_fdualquat |
Dual-quaternion of low single-qualifier floating-point numbers. More... | |
typedef tdualquat< double, mediump > | mediump_ddualquat |
Dual-quaternion of medium double-qualifier floating-point numbers. More... | |
typedef tdualquat< float, mediump > | mediump_dualquat |
Dual-quaternion of medium single-qualifier floating-point numbers. More... | |
typedef tdualquat< float, mediump > | mediump_fdualquat |
Dual-quaternion of medium single-qualifier floating-point numbers. More... | |
+Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | dual_quat_identity () |
Creates an identity dual quaternion. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | dualquat_cast (mat< 2, 4, T, Q > const &x) |
Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | dualquat_cast (mat< 3, 4, T, Q > const &x) |
Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | inverse (tdualquat< T, Q > const &q) |
Returns the q inverse. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | lerp (tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a) |
Returns the linear interpolation of two dual quaternion. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 2, 4, T, Q > | mat2x4_cast (tdualquat< T, Q > const &x) |
Converts a quaternion to a 2 * 4 matrix. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 3, 4, T, Q > | mat3x4_cast (tdualquat< T, Q > const &x) |
Converts a quaternion to a 3 * 4 matrix. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL tdualquat< T, Q > | normalize (tdualquat< T, Q > const &q) |
Returns the normalized quaternion. More... | |
Definition in file dual_quaternion.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseIn (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseIn (genType const &a, genType const &o) |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseInOut (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseInOut (genType const &a, genType const &o) |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseOut (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | backEaseOut (genType const &a, genType const &o) |
template<typename genType > | |
GLM_FUNC_DECL genType | bounceEaseIn (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | bounceEaseInOut (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | bounceEaseOut (genType const &a) |
template<typename genType > | |
GLM_FUNC_DECL genType | circularEaseIn (genType const &a) |
Modelled after shifted quadrant IV of unit circle. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | circularEaseInOut (genType const &a) |
Modelled after the piecewise circular function y = (1/2)(1 - sqrt(1 - 4x^2)) ; [0, 0.5) y = (1/2)(sqrt(-(2x - 3)*(2x - 1)) + 1) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | circularEaseOut (genType const &a) |
Modelled after shifted quadrant II of unit circle. More... | |
+template<typename genType > | |
GLM_FUNC_DECL genType | cubicEaseIn (genType const &a) |
Modelled after the cubic y = x^3. | |
template<typename genType > | |
GLM_FUNC_DECL genType | cubicEaseInOut (genType const &a) |
Modelled after the piecewise cubic y = (1/2)((2x)^3) ; [0, 0.5) y = (1/2)((2x-2)^3 + 2) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | cubicEaseOut (genType const &a) |
Modelled after the cubic y = (x - 1)^3 + 1. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | elasticEaseIn (genType const &a) |
Modelled after the damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1)) More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | elasticEaseInOut (genType const &a) |
Modelled after the piecewise exponentially-damped sine wave: y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) ; [0,0.5) y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | elasticEaseOut (genType const &a) |
Modelled after the damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | exponentialEaseIn (genType const &a) |
Modelled after the exponential function y = 2^(10(x - 1)) More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | exponentialEaseInOut (genType const &a) |
Modelled after the piecewise exponential y = (1/2)2^(10(2x - 1)) ; [0,0.5) y = -(1/2)*2^(-10(2x - 1))) + 1 ; [0.5,1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | exponentialEaseOut (genType const &a) |
Modelled after the exponential function y = -2^(-10x) + 1. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | linearInterpolation (genType const &a) |
Modelled after the line y = x. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quadraticEaseIn (genType const &a) |
Modelled after the parabola y = x^2. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quadraticEaseInOut (genType const &a) |
Modelled after the piecewise quadratic y = (1/2)((2x)^2) ; [0, 0.5) y = -(1/2)((2x-1)*(2x-3) - 1) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quadraticEaseOut (genType const &a) |
Modelled after the parabola y = -x^2 + 2x. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quarticEaseIn (genType const &a) |
Modelled after the quartic x^4. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quarticEaseInOut (genType const &a) |
Modelled after the piecewise quartic y = (1/2)((2x)^4) ; [0, 0.5) y = -(1/2)((2x-2)^4 - 2) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quarticEaseOut (genType const &a) |
Modelled after the quartic y = 1 - (x - 1)^4. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quinticEaseIn (genType const &a) |
Modelled after the quintic y = x^5. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quinticEaseInOut (genType const &a) |
Modelled after the piecewise quintic y = (1/2)((2x)^5) ; [0, 0.5) y = (1/2)((2x-2)^5 + 2) ; [0.5, 1]. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | quinticEaseOut (genType const &a) |
Modelled after the quintic y = (x - 1)^5 + 1. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | sineEaseIn (genType const &a) |
Modelled after quarter-cycle of sine wave. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | sineEaseInOut (genType const &a) |
Modelled after half sine wave. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | sineEaseOut (genType const &a) |
Modelled after quarter-cycle of sine wave (different phase) More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | epsilonEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon) |
Returns the component-wise comparison of |x - y| < epsilon. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | epsilonEqual (genType const &x, genType const &y, genType const &epsilon) |
Returns the component-wise comparison of |x - y| < epsilon. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, bool, Q > | epsilonNotEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon) |
Returns the component-wise comparison of |x - y| < epsilon. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | epsilonNotEqual (genType const &x, genType const &y, genType const &epsilon) |
Returns the component-wise comparison of |x - y| >= epsilon. More... | |
Definition in file epsilon.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | derivedEulerAngleX (T const &angleX, T const &angularVelocityX) |
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about X-axis. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | derivedEulerAngleY (T const &angleY, T const &angularVelocityY) |
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Y-axis. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | derivedEulerAngleZ (T const &angleZ, T const &angularVelocityZ) |
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Z-axis. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleX (T const &angleX) |
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXY (T const &angleX, T const &angleY) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXYX (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXYZ (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXZ (T const &angleX, T const &angleZ) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXZX (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleXZY (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleY (T const &angleY) |
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYX (T const &angleY, T const &angleX) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYXY (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYXZ (T const &yaw, T const &pitch, T const &roll) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYZ (T const &angleY, T const &angleZ) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYZX (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleYZY (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZ (T const &angleZ) |
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZX (T const &angle, T const &angleX) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZXY (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZXZ (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZY (T const &angleZ, T const &angleY) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZYX (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * X). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | eulerAngleZYZ (T const &t1, T const &t2, T const &t3) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleXYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (X * Y * X) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleXYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (X * Y * Z) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleXZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (X * Z * X) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleXZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (X * Z * Y) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleYXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Y * X * Y) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleYXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Y * X * Z) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleYZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Y * Z * X) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleYZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Y * Z * Y) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleZXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Z * X * Y) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleZXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Z * X * Z) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleZYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Z * Y * X) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL void | extractEulerAngleZYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3) |
Extracts the (Z * Y * Z) Euler angles from the rotation matrix M. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 2, 2, T, defaultp > | orientate2 (T const &angle) |
Creates a 2D 2 * 2 rotation matrix from an euler angle. More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 3, 3, T, defaultp > | orientate3 (T const &angle) |
Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 3, 3, T, Q > | orientate3 (vec< 3, T, Q > const &angles) |
Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | orientate4 (vec< 3, T, Q > const &angles) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). More... | |
template<typename T > | |
GLM_FUNC_DECL mat< 4, 4, T, defaultp > | yawPitchRoll (T const &yaw, T const &pitch, T const &roll) |
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | exp (vec< L, T, Q > const &v) |
Returns the natural exponentiation of x, i.e., e^x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | exp2 (vec< L, T, Q > const &v) |
Returns 2 raised to the v power. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | inversesqrt (vec< L, T, Q > const &v) |
Returns the reciprocal of the positive square root of v. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | log (vec< L, T, Q > const &v) |
Returns the natural logarithm of v, i.e., returns the value y which satisfies the equation x = e^y. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | log2 (vec< L, T, Q > const &v) |
Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | pow (vec< L, T, Q > const &base, vec< L, T, Q > const &exponent) |
Returns 'base' raised to the power 'exponent'. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | sqrt (vec< L, T, Q > const &v) |
Returns the positive square root of v. More... | |
Definition in file exponential.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Core features (Dependence) +More...
+ +Go to the source code of this file.
+Core features (Dependence)
+ +Definition in file ext.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | extend (genType const &Origin, genType const &Source, typename genType::value_type const Length) |
Extends of Length the Origin position using the (Source - Origin) direction. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_extented_min_max +More...
+ +Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | fclamp (genType x, genType minVal, genType maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fclamp (vec< L, T, Q > const &x, T minVal, T maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fclamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal) |
Returns min(max(x, minVal), maxVal) for each component in x. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fmax (genType x, genType y) |
Returns y if x < y; otherwise, it returns x. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fmin (genType x, genType y) |
Returns y if y < x; otherwise, it returns x. More... | |
template<typename T > | |
GLM_FUNC_DECL T | max (T const &x, T const &y, T const &z) |
Return the maximum component-wise values of 3 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z) |
Return the maximum component-wise values of 3 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | max (C< T > const &x, C< T > const &y, C< T > const &z) |
Return the maximum component-wise values of 3 inputs. More... | |
template<typename T > | |
GLM_FUNC_DECL T | max (T const &x, T const &y, T const &z, T const &w) |
Return the maximum component-wise values of 4 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w) |
Return the maximum component-wise values of 4 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | max (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w) |
Return the maximum component-wise values of 4 inputs. More... | |
template<typename T > | |
GLM_FUNC_DECL T | min (T const &x, T const &y, T const &z) |
Return the minimum component-wise values of 3 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z) |
Return the minimum component-wise values of 3 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | min (C< T > const &x, C< T > const &y, C< T > const &z) |
Return the minimum component-wise values of 3 inputs. More... | |
template<typename T > | |
GLM_FUNC_DECL T | min (T const &x, T const &y, T const &z, T const &w) |
Return the minimum component-wise values of 4 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w) |
Return the minimum component-wise values of 4 inputs. More... | |
template<typename T , template< typename > class C> | |
GLM_FUNC_DECL C< T > | min (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w) |
Return the minimum component-wise values of 4 inputs. More... | |
Definition in file extended_min_max.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_exterior_product +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL T | cross (vec< 2, T, Q > const &v, vec< 2, T, Q > const &u) |
Returns the cross product of x and y. More... | |
Definition in file exterior_product.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_fast_exponential +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T > | |
GLM_FUNC_DECL T | fastExp (T x) |
Faster than the common exp function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastExp (vec< L, T, Q > const &x) |
Faster than the common exp function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastExp2 (T x) |
Faster than the common exp2 function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastExp2 (vec< L, T, Q > const &x) |
Faster than the common exp2 function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastLog (T x) |
Faster than the common log function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastLog (vec< L, T, Q > const &x) |
Faster than the common exp2 function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastLog2 (T x) |
Faster than the common log2 function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastLog2 (vec< L, T, Q > const &x) |
Faster than the common log2 function but less accurate. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastPow (genType x, genType y) |
Faster than the common pow function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastPow (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Faster than the common pow function but less accurate. More... | |
template<typename genTypeT , typename genTypeU > | |
GLM_FUNC_DECL genTypeT | fastPow (genTypeT x, genTypeU y) |
Faster than the common pow function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastPow (vec< L, T, Q > const &x) |
Faster than the common pow function but less accurate. More... | |
Definition in file fast_exponential.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_fast_square_root +More...
+ +Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastDistance (genType x, genType y) |
Faster than the common distance function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL T | fastDistance (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Faster than the common distance function but less accurate. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastInverseSqrt (genType x) |
Faster than the common inversesqrt function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastInverseSqrt (vec< L, T, Q > const &x) |
Faster than the common inversesqrt function but less accurate. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastLength (genType x) |
Faster than the common length function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL T | fastLength (vec< L, T, Q > const &x) |
Faster than the common length function but less accurate. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastNormalize (genType const &x) |
Faster than the common normalize function but less accurate. More... | |
template<typename genType > | |
GLM_FUNC_DECL genType | fastSqrt (genType x) |
Faster than the common sqrt function but less accurate. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | fastSqrt (vec< L, T, Q > const &x) |
Faster than the common sqrt function but less accurate. More... | |
Definition in file fast_square_root.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_fast_trigonometry +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T > | |
GLM_FUNC_DECL T | fastAcos (T angle) |
Faster than the common acos function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastAsin (T angle) |
Faster than the common asin function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastAtan (T y, T x) |
Faster than the common atan function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastAtan (T angle) |
Faster than the common atan function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastCos (T angle) |
Faster than the common cos function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastSin (T angle) |
Faster than the common sin function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | fastTan (T angle) |
Faster than the common tan function but less accurate. More... | |
template<typename T > | |
GLM_FUNC_DECL T | wrapAngle (T angle) |
Wrap an angle to [0 2pi[ From GLM_GTX_fast_trigonometry extension. More... | |
Definition in file fast_trigonometry.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename T > | |
GLM_FUNC_DECL T | gauss (T x, T ExpectedValue, T StandardDeviation) |
1D gauss function More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL T | gauss (vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation) |
2D gauss function More... | |
Definition in file functions.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 3, T, Q > | cross (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y) |
Returns the cross product of x and y. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL T | distance (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1) |
Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL T | dot (vec< L, T, Q > const &x, vec< L, T, Q > const &y) |
Returns the dot product of x and y, i.e., result = x * y. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | faceforward (vec< L, T, Q > const &N, vec< L, T, Q > const &I, vec< L, T, Q > const &Nref) |
If dot(Nref, I) < 0.0, return N, otherwise, return -N. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL T | length (vec< L, T, Q > const &x) |
Returns the length of x, i.e., sqrt(x * x). More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | normalize (vec< L, T, Q > const &x) |
Returns a vector in the same direction as x but with length of 1. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | reflect (vec< L, T, Q > const &I, vec< L, T, Q > const &N) |
For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | refract (vec< L, T, Q > const &I, vec< L, T, Q > const &N, T eta) |
For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector. More... | |
Definition in file geometric.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_gradient_paint +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL T | linearGradient (vec< 2, T, Q > const &Point0, vec< 2, T, Q > const &Point1, vec< 2, T, Q > const &Position) |
Return a color from a linear gradient. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL T | radialGradient (vec< 2, T, Q > const &Center, T const &Radius, vec< 2, T, Q > const &Focal, vec< 2, T, Q > const &Position) |
Return a color from a radial gradient. More... | |
Definition in file gradient_paint.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
GLM_GTX_handed_coordinate_space +More...
+ +Go to the source code of this file.
++Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL bool | leftHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal) |
Return if a trihedron left handed or not. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL bool | rightHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal) |
Return if a trihedron right handed or not. More... | |
GLM_GTX_handed_coordinate_space
+Definition in file handed_coordinate_space.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, int, Q > | iround (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer to x. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL genIUType | log2 (genIUType x) |
Returns the log2 of x for integer values. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, uint, Q > | uround (vec< L, T, Q > const &x) |
Returns a value equal to the nearest integer to x. More... | |
Definition in file gtc/integer.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Typedefs | |
typedef signed int | sint |
32bit signed integer. More... | |
+Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | factorial (genType const &x) |
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension. More... | |
GLM_FUNC_DECL unsigned int | floor_log2 (unsigned int x) |
Returns the floor log2 of x. More... | |
GLM_FUNC_DECL int | mod (int x, int y) |
Modulus. More... | |
GLM_FUNC_DECL uint | mod (uint x, uint y) |
Modulus. More... | |
GLM_FUNC_DECL uint | nlz (uint x) |
Returns the number of leading zeros. More... | |
GLM_FUNC_DECL int | pow (int x, uint y) |
Returns x raised to the y power. More... | |
GLM_FUNC_DECL uint | pow (uint x, uint y) |
Returns x raised to the y power. More... | |
GLM_FUNC_DECL int | sqrt (int x) |
Returns the positive square root of x. More... | |
GLM_FUNC_DECL uint | sqrt (uint x) |
Returns the positive square root of x. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL int | bitCount (genType v) |
Returns the number of bits set to 1 in the binary representation of value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, int, Q > | bitCount (vec< L, T, Q > const &v) |
Returns the number of bits set to 1 in the binary representation of value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldExtract (vec< L, T, Q > const &Value, int Offset, int Bits) |
Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldInsert (vec< L, T, Q > const &Base, vec< L, T, Q > const &Insert, int Offset, int Bits) |
Returns the insertion the bits least-significant bits of insert into base. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | bitfieldReverse (vec< L, T, Q > const &v) |
Returns the reversal of the bits of value. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL int | findLSB (genIUType x) |
Returns the bit number of the least significant bit set to 1 in the binary representation of value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, int, Q > | findLSB (vec< L, T, Q > const &v) |
Returns the bit number of the least significant bit set to 1 in the binary representation of value. More... | |
template<typename genIUType > | |
GLM_FUNC_DECL int | findMSB (genIUType x) |
Returns the bit number of the most significant bit in the binary representation of value. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, int, Q > | findMSB (vec< L, T, Q > const &v) |
Returns the bit number of the most significant bit in the binary representation of value. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL void | imulExtended (vec< L, int, Q > const &x, vec< L, int, Q > const &y, vec< L, int, Q > &msb, vec< L, int, Q > &lsb) |
Multiplies 32-bit integers x and y, producing a 64-bit result. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, uint, Q > | uaddCarry (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &carry) |
Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32). More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL void | umulExtended (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &msb, vec< L, uint, Q > &lsb) |
Multiplies 32-bit integers x and y, producing a 64-bit result. More... | |
template<length_t L, qualifier Q> | |
GLM_FUNC_DECL vec< L, uint, Q > | usubBorrow (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &borrow) |
Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise. More... | |
Definition in file integer.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL bool | intersectLineSphere (genType const &point0, genType const &point1, genType const &sphereCenter, typename genType::value_type sphereRadius, genType &intersectionPosition1, genType &intersectionNormal1, genType &intersectionPosition2=genType(), genType &intersectionNormal2=genType()) |
Compute the intersection of a line and a sphere. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | intersectLineTriangle (genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position) |
Compute the intersection of a line and a triangle. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | intersectRayPlane (genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance) |
Compute the intersection of a ray and a plane. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type &intersectionDistance) |
Compute the intersection distance of a ray and a sphere. More... | |
template<typename genType > | |
GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal) |
Compute the intersection of a ray and a sphere. More... | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL bool | intersectRayTriangle (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dir, vec< 3, T, Q > const &v0, vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 2, T, Q > &baryPosition, T &distance) |
Compute the intersection of a ray and a triangle. More... | |
Definition in file intersect.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file io.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
++Functions | |
template<typename genType > | |
GLM_FUNC_DECL genType | log (genType const &x, genType const &base) |
Logarithm for any base. More... | |
template<length_t L, typename T , qualifier Q> | |
GLM_FUNC_DECL vec< L, T, Q > | sign (vec< L, T, Q > const &x, vec< L, T, Q > const &base) |
Logarithm for any base. More... | |
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat2x2.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat2x3.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat2x4.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat3x2.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat3x3.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat3x4.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat4x2.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat4x3.hpp.
++ |
+ 0.9.9 API documentation
+
+ |
+
+ |
+ 0.9.9 API documentation
+
+ |
+
Go to the source code of this file.
+Definition in file mat4x4.hpp.
+