Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
compositelocator.h
1//##################################################################################################
2//
3// Copyright (c) 2024 Beijing Qiongqi Tech Co.,Ltd. All rights reserved.
4
5// This source code is confidential and proprietary to Beijing Qiongqi Tech Co.,Ltd(The Holder).
6// Any unauthorized use, copying, modification, or distribution of the code is strictly prohibited.
7// Any user shall obtain authorizaition from the Holder before modifying the source code. And the user shall not
8// sublicense, sell, distribute, or transfer the source code, whether in original or modified form, to any third party
9// without the prior written consent of the Holder.
10
11// This copyright notice and permission grant shall be included in all copies or substantial portions of the source code.
12
13// Author Cumulia Illustrator
14// Date 2024-10-31
15// Version V1.1.0
16//##################################################################################################
17
18#pragma once
19
20#include "abstractlocator.h"
21
22#include <cilcore.h>
23
24#include <memory>
25
26namespace cil
27{
28 class Locator;
29 class ShapeLocator;
32 {
33 public:
35 enum class BindMode {
36 None = 0x0000,
37 Center = 0x0001,
38 Bottom = 0x0002,
39 Corner = 0x0003,
40 };
41
42 public:
43 std::shared_ptr<Locator> origin;
44 std::shared_ptr<ShapeLocator> shape;
45
46 private:
47 Matrix4f m_matrix;
48 BindMode m_mode;
49
50 public:
52 CompositeLocator(const std::shared_ptr<Locator>& origin, const std::shared_ptr<ShapeLocator>& shape);
54
57 const Matrix4f& matrix() const;
61 };
62
63 std::shared_ptr<CompositeLocator> _compositeLocator(const std::shared_ptr<Locator>& origin, const std::shared_ptr<ShapeLocator>& shape);
64}
The AbstractLocator class inheriting from Node class and EventWatcher class, representing the abstrac...
Definition abstractlocator.h:29
The CompositeLocator class inheriting from AbstractLocator class, represents a locator composed of tw...
Definition compositelocator.h:32
std::shared_ptr< Locator > origin
Definition compositelocator.h:43
CompositeLocator(const std::shared_ptr< Locator > &origin, const std::shared_ptr< ShapeLocator > &shape)
Builds the composite locator with two child locators, one is the Locator type, and the other is the S...
void setBindMode(BindMode mode)
Sets the method for combining the two locators.
void setMatrix(const Matrix4f &matrix)
Sets the transformation matrix of two locator nodes and the local matrix of the shape locator node.
const Matrix4f & matrix() const
BindMode bindMode() const
virtual ~CompositeLocator()
std::shared_ptr< ShapeLocator > shape
Definition compositelocator.h:44
BindMode
The BindMode enumeration defines different ways to combine two locators.
Definition compositelocator.h:35
The Matrix4f class is 4 X 4 matrix.
Definition matrix.h:226
Definition decal.h:23
std::shared_ptr< CompositeLocator > _compositeLocator(const std::shared_ptr< Locator > &origin, const std::shared_ptr< ShapeLocator > &shape)