Commit graph

56 commits

Author SHA1 Message Date
Leonardo Zide
3a62411f0b Removed lcArray.
Some checks failed
LeoCAD CI / build-ubuntu (push) Has been cancelled
LeoCAD CI / build-macos (push) Has been cancelled
2024-06-19 19:59:43 -07:00
Leonardo Zide
3378359ae8 Array cleanup. 2024-06-09 12:33:02 -07:00
Leonardo Zide
80d144fea8 Array cleanup. 2024-05-26 13:01:34 -07:00
Leonardo Zide
4e27344f39 Removed lcArray. 2024-05-13 19:59:37 -07:00
Leonardo Zide
274b5816f5 Fixed inserted control points not added under the mouse. 2024-05-13 17:10:55 -07:00
Leonardo Zide
aae75b36fe Removed lcArray from control points. 2024-05-12 12:45:15 -07:00
Leonardo Zide
7162639295 Calculate texcoords at the end of the file load. Fixes #641. 2021-06-13 15:35:40 -07:00
Johannes Sixt
a0cadfcfa5 Synthesize Technic Pneumatic Tubes with End Bulges. 2021-03-21 10:18:49 +01:00
Johannes Sixt
6bbecad7e2 Synthesize Technic Pneumatic Tubes. 2021-03-21 10:18:43 +01:00
Johannes Sixt
94f7a9800a Factor out a function that constructs a tube mesh.
Later, we want to make tubes with different radii.

While we are here, correct the winding of the triangles that make the
inner tube.
2021-03-21 10:13:00 +01:00
Leonardo Zide
c3ad14ac04 Conditional line shader. 2021-03-06 18:54:24 -08:00
Johannes Sixt
7ab0928fed Synthesize another universal joint.
The LDraw 2019-03 library update brought a new universal joint piece.

Adjust titles of the other joint that were updated at the same time.
2020-06-01 19:20:42 +02:00
Johannes Sixt
303b42ba12 Synthesize Technic Linear Actuator 4 x 1 x 1. 2020-06-01 18:23:20 +02:00
Johannes Sixt
48d6f14532 Synthesize linear actuators with new IDs.
Technic Power Functions Linear Actuators were moved to a new ID in the
2017-01 LDraw library update and then renamed in the 2019-03 update.
2020-06-01 18:22:48 +02:00
Leonardo Zide
2390feb88f Deleted unsafe default operations. 2020-05-03 15:39:39 -07:00
Johannes Sixt
ca73f3e3ad
Synthesis of Technic Universal Joints (#456)
* Split synth info initialzation by type.

We are going to remove the type enumeration and use a class hierarchy
instead. This preparation will then be helpful.

* Make Add...Parts() overrides of a virtual AddPart() function.

Since we have a class hierarchy for the different synthesized pieces, we
can now turn a case distinction into a virtual function call.

* Move initialization based on type to derived class constructors.

Move initialization of end transformations of flexible parts into
class lcSynthInfoCurved.

* Make GetDefaultControlPoints() virtual with overrides.

* Remove obsolete enum lcSynthType.

We have replaced its purpose by derived classes by now.

* Initialize shock absorbers' spring part ID early.

This removes the awkward early return that is needed in the if-else
cascade.

* Split lcSynthInfo into derived classes for curved and straight pieces.

* Only curved parts have varying sections, start, middle, and end properties.

Move the properties from the base class to the derived class that needs
them.

* Use derived classes to mark synthesized objects of different kinds.

We will extend the derived classes in the upcoming commits.

* PieceInfo is only needed to synthesize some hoses and shock absorbers.

* Initialize edge part IDs of flexible hoses early.

This removes another case distinction in AddParts().

* Verify the number of control points loaded from a model file.

* Synthesize Technic universal joints.

The direction of one end can be changed so that it points to the control
point.

* Technic universal joints need only the position of the control point.

* Synthesize legacy universal joints.
2020-03-30 12:17:08 -07:00
Leonardo Zide
24890ecebd Added array count macro. 2019-12-09 11:43:54 -08:00
Leonardo Zide
1e2f6c208f Moved mesh loading code to a separate file. 2019-07-27 16:31:16 -07:00
Johannes Sixt
19e1493251 Fix spring of synthesized shock absorbers (stiff, extra stiff, soft versions) (#360) 2019-06-23 10:48:25 -07:00
Leonardo Zide
0d1af47be4 Warning fixes. 2019-05-28 11:10:21 -07:00
Leonardo Zide
b47598f651 Added synth support for Hose Flexible parts. 2019-02-20 16:52:50 -08:00
Leonardo Zide
8ee515fcc8 Added synth support for Technic Flex-System hoses. 2019-02-19 18:05:30 -08:00
Johannes Sixt
e190900778 Convert SectionCallback to std::function<>. (#280)
This is just code hygiene. It makes the code shorter, more localized,
and more idiomatic C++.
2019-01-13 10:48:37 -08:00
Leonardo Zide
508b1e416f Fixed string braided synth orientation. 2018-06-03 12:53:53 -07:00
Leonardo Zide
b4448e2d63 Fixed string braided normals. 2018-05-27 13:19:45 -07:00
Leonardo Zide
4f549e9163 Added new flexible ribbed hose lengths. 2018-05-26 18:13:04 -07:00
Leonardo Zide
39bd299b56 Fixed flexible axle normals. 2018-05-26 12:30:20 -07:00
Leonardo Zide
636e013455 Removed lcint types. 2017-12-02 12:22:04 -08:00
Leonardo Zide
cc4dbb1fc8 Linux fixes. 2017-07-27 10:02:07 -07:00
Leonardo Zide
82528a2c7a Don't uppercase part names when saving. 2017-07-27 09:21:55 -07:00
Leonardo Zide
bca9b205af Support loading textures from the same folder of the model being loaded. 2017-07-01 17:12:09 -07:00
leozide
dc7f640bc9 Enum compiler test. 2017-04-13 18:12:10 -07:00
leozide
f7d61f33ce Updated code to use nullptr and override. 2017-04-13 17:26:40 -07:00
Johannes Sixt
8ee94ac310 Synthesize power functions linear actuators.
Power function linear actuators can be treated almost the same as shock
absorbers. The only difference is the orientation of the part: The parts
are extended is along the Y axis instead of the Z axis.
2017-03-18 14:58:11 +01:00
leozide
9978230506 Calculate mesh normals. 2017-02-27 16:03:12 -08:00
Leonardo Zide
6df1ceb165 Parse BFC statements in parts. 2017-02-21 08:09:13 -08:00
Leonardo Zide
ca1505f770 Change the locale at startup only. 2017-01-23 20:46:52 -08:00
Leonardo Zide
8152f99ec4 Fixed compiler warnings. 2016-12-01 23:09:14 -08:00
Leonardo Zide
dcfccd8eeb Rewrote how loose model files are loaded. 2016-11-25 17:12:19 -08:00
Leonardo
a74e51cd04 Fixed line endings. 2016-10-05 14:28:52 -07:00
leo
65b8880bf8 OSX fixes. 2016-05-08 02:16:52 +00:00
leo
4d9113c1d0 Fixed gcc warnings. 2016-05-02 18:22:38 +00:00
leo
a0db9ce210 Added synth support for shock absorbers. 2016-05-01 00:20:37 +00:00
leo
9c8a602a09 Fixed accessing const arrays as non-const. 2016-04-19 18:37:50 +00:00
leo
6547969d24 Fixed a few rotation bugs in flexible objects. 2016-04-19 16:30:29 +00:00
leo
8de6f06113 Removed debug color. 2016-04-16 20:49:14 +00:00
leo
59e8583ee4 Optimized flexible axle generation. 2016-04-16 20:35:16 +00:00
leo
a24ebaaab9 Better string mesh generation. 2016-04-11 15:45:08 +00:00
leo
07d29d0fc5 Added support for flexible braided strings. 2016-04-04 05:11:29 +00:00
leo
1902dff957 Made control points translucent. 2016-03-12 00:38:02 +00:00