OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Utils.hpp File Reference
#include "../include/Types.hpp"
#include <vector>
#include <cstdint>
Include dependency graph for Utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  libvgcode
 |/ Copyright (c) Prusa Research 2023 Enrico Turri @enricoturri1966, Pavel Mikuš @Godrak |/ |/ libvgcode is released under the terms of the AGPLv3 or higher |/

Macros

#define STDVEC_MEMSIZE(NAME, TYPE)
 |/ Copyright (c) Prusa Research 2023 Enrico Turri @enricoturri1966 |/ |/ libvgcode is released under the terms of the AGPLv3 or higher |/

Functions

void libvgcode::add_vertex (const Vec3 &position, const Vec3 &normal, std::vector< float > &vertices)
void libvgcode::add_triangle (uint16_t v1, uint16_t v2, uint16_t v3, std::vector< uint16_t > &indices)
Vec3 libvgcode::normalize (const Vec3 &v)
float libvgcode::dot (const Vec3 &v1, const Vec3 &v2)
float libvgcode::length (const Vec3 &v)
bool libvgcode::operator== (const Vec3 &v1, const Vec3 &v2)
bool libvgcode::operator!= (const Vec3 &v1, const Vec3 &v2)
Vec3 libvgcode::operator+ (const Vec3 &v1, const Vec3 &v2)
Vec3 libvgcode::operator- (const Vec3 &v1, const Vec3 &v2)
Vec3 libvgcode::operator* (float f, const Vec3 &v)

Macro Definition Documentation

◆ STDVEC_MEMSIZE

#define STDVEC_MEMSIZE ( NAME,
TYPE )
Value:
NAME.capacity() * ((sizeof(TYPE) + alignof(TYPE) - 1) / alignof(TYPE)) * alignof(TYPE)

|/ Copyright (c) Prusa Research 2023 Enrico Turri @enricoturri1966 |/ |/ libvgcode is released under the terms of the AGPLv3 or higher |/

Referenced by libvgcode::ViewerImpl::get_used_cpu_memory(), libvgcode::ColorRange::size_in_bytes_cpu(), and libvgcode::Layers::size_in_bytes_cpu().