1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2021 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.objectlib.helpers;
|
11
|
|
12
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
13
|
|
14
|
public class ObjectSticker
|
15
|
{
|
16
|
private final float[] mCoords;
|
17
|
private final float[] mCurvature;
|
18
|
private final float[] mRadii;
|
19
|
private final float mStroke;
|
20
|
|
21
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
22
|
|
23
|
public ObjectSticker(float[] coords, float[] curvature, float[] radii, float stroke)
|
24
|
{
|
25
|
mCoords = coords;
|
26
|
mCurvature = curvature;
|
27
|
mRadii = radii;
|
28
|
mStroke = stroke;
|
29
|
}
|
30
|
|
31
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
32
|
|
33
|
public float[] getCoords()
|
34
|
{
|
35
|
return mCoords;
|
36
|
}
|
37
|
|
38
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
39
|
|
40
|
public float[] getCurvature()
|
41
|
{
|
42
|
return mCurvature;
|
43
|
}
|
44
|
|
45
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
46
|
|
47
|
public float[] getRadii()
|
48
|
{
|
49
|
return mRadii;
|
50
|
}
|
51
|
|
52
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
53
|
|
54
|
public float getStroke()
|
55
|
{
|
56
|
return mStroke;
|
57
|
}
|
58
|
|
59
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
60
|
|
61
|
public String debug()
|
62
|
{
|
63
|
String dbg="coords: ";
|
64
|
int len = mCoords.length;
|
65
|
for(int i=0; i<len; i++) dbg+= (" "+mCoords[i]);
|
66
|
|
67
|
dbg+= "\ncurvature: ";
|
68
|
len = mCurvature==null ? 0: mCurvature.length;
|
69
|
for(int i=0; i<len; i++) dbg+= (" "+mCurvature[i]);
|
70
|
|
71
|
dbg+= "\nradii: ";
|
72
|
len = mRadii==null ? 0: mRadii.length;
|
73
|
for(int i=0; i<len; i++) dbg+= (" "+mRadii[i]);
|
74
|
|
75
|
dbg+= "\nstroke: "+mStroke;
|
76
|
|
77
|
return dbg;
|
78
|
}
|
79
|
}
|