Plasma Engine
2.0
Loading...
Searching...
No Matches
Size.h
1
#pragma once
2
3
#include <Foundation/Basics.h>
4
7
template
<
typename
Type>
8
class
plSizeTemplate
9
{
10
public
:
11
// Means this object can be copied using memcpy instead of copy construction.
12
PL_DECLARE_POD_TYPE();
13
14
// *** Data ***
15
public
:
16
Type width;
17
Type height;
18
19
// *** Constructors ***
20
public
:
22
plSizeTemplate
();
23
25
plSizeTemplate
(Type width, Type height);
26
27
// *** Common Functions ***
28
public
:
30
bool
HasNonZeroArea
()
const
;
31
};
32
33
template
<
typename
Type>
34
bool
operator==(
const
plSizeTemplate<Type>
& v1,
const
plSizeTemplate<Type>
& v2);
35
36
template
<
typename
Type>
37
bool
operator!=(
const
plSizeTemplate<Type>
& v1,
const
plSizeTemplate<Type>
& v2);
38
39
#include <Foundation/Math/Implementation/Size_inl.h>
40
41
using
plSizeU32
=
plSizeTemplate<plUInt32>
;
42
using
plSizeFloat
=
plSizeTemplate<float>
;
43
using
plSizeDouble
=
plSizeTemplate<double>
;
plSizeTemplate
A simple size class templated on the type for width and height.
Definition
Size.h:9
plSizeTemplate::HasNonZeroArea
bool HasNonZeroArea() const
Returns true if the area described by the size is non zero.
Definition
Size_inl.h:14
plSizeTemplate::plSizeTemplate
plSizeTemplate()
Default constructor does not initialize the data.
Code
Engine
Foundation
Math
Size.h
Generated by
1.11.0