AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
DOMPoint.hpp
1/*
2Copyright (C) 2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_DOMPOINT_HPP
17#define AEONGUI_DOMPOINT_HPP
18
19#include "aeongui/Platform.hpp"
20#include "aeongui/dom/DOMPointReadOnly.hpp"
21
22namespace AeonGUI
23{
24 namespace DOM
25 {
31 class DLL DOMPoint : public DOMPointReadOnly
32 {
33 public:
40 DOMPoint ( float x = 0.0f, float y = 0.0f, float z = 0.0f, float w = 1.0f );
42 virtual ~DOMPoint() final;
43 using DOMPointReadOnly::x;
44 using DOMPointReadOnly::y;
45 using DOMPointReadOnly::z;
46 using DOMPointReadOnly::w;
52 template <typename T>
53 static DOMPoint fromPoint ( const T& point )
54 {
55 return DOMPoint ( point.x(), point.y(), point.z(), point.w() );
56 }
57
61 float x ( float newX );
66 float y ( float newY );
71 float z ( float newZ );
76 float w ( float newW );
77 };
78 }
79}
80
81#endif
Platform-specific DLL import/export macros and compiler helpers.
static DOMPoint fromPoint(const T &point)
Create a DOMPoint from any point-like object.
Definition DOMPoint.hpp:53
float x(float newX)
Set the X coordinate.
Definition DOMPoint.cpp:28
float y(float newY)
Set the Y coordinate.
Definition DOMPoint.cpp:34
DOMPoint(float x=0.0f, float y=0.0f, float z=0.0f, float w=1.0f)
Construct a point.
Definition DOMPoint.cpp:22
float z(float newZ)
Set the Z coordinate.
Definition DOMPoint.cpp:40
virtual ~DOMPoint() final
Destructor.
float w(float newW)
Set the W component.
Definition DOMPoint.cpp:46
DOMPointReadOnly(float x=0.0f, float y=0.0f, float z=0.0f, float w=1.0f)
Construct a point.
Definition DOMPointReadOnly.cpp:24