10 {
11 if (argc < 2) {
12 std::cout << "Provide input dna file!" << std::endl;
13 std::cout <<
usage << std::endl;
14 return -1;
15 }
16
17 const char* inputDNA = argv[1];
18 auto inStream = dnac::makeScoped<dnac::FileStream>(inputDNA,
19 dnac::FileStream::AccessMode::Read,
20 dnac::FileStream::OpenMode::Binary);
21 auto reader = dnac::makeScoped<dnac::BinaryStreamReader>(inStream.get());
22 reader->read();
23
25 std::cout << "Could not read input DNA file!\n";
26 return -1;
27 }
28
29 auto dnaReader = dnac::makeScoped<dnac::DNACalibDNAReader>(reader.get());
30
31
33
34
35 std::vector<dnac::Vector3> positions;
36 std::vector<float> masks;
42
43
44 cmdSeq.
add(&setMeshAPos, &renameJointA);
45 cmdSeq.
add(&renameJointB);
46
47
48 cmdSeq.
run(dnaReader.get());
49
50
51 renameJointB.setName("FACIAL_L_12IPV_NeckBackB2", "FACIAL_L_12IPTV_NickelBackB52");
52
53
54 cmdSeq.
remove(&renameJointA);
55 auto guardedRenameJointA =
58 });
59 cmdSeq.
add(&guardedRenameJointA);
60
61
62 cmdSeq.
run(dnaReader.get());
63
64 return 0;
65}
virtual std::uint16_t getJointCount() const =0
CommandSequence is used to run a sequence of commands on the same DNA.
Definition: CommandSequence.h:20
DNACAPI void run(DNACalibDNAReader *output) override
Definition: src/dnacalib/commands/CommandSequence.cpp:57
DNACAPI void add(Command *command)
Method for adding a command to a sequence of commands to run.
Definition: src/dnacalib/commands/CommandSequence.cpp:61
DNACAPI void remove(Command *command)
Method for removing a command from the sequence of commands to run.
Definition: src/dnacalib/commands/CommandSequence.cpp:71
Definition: DNACalibDNAReader.h:12
RenameJointCommand is used to rename a joint.
Definition: RenameJointCommand.h:18
SetVertexPositionsCommand is used to change vertex positions values.
Definition: SetVertexPositionsCommand.h:19
static bool isOk()
Definition: Status.cpp:13
A view over a continuous sequence of objects.
Definition: ArrayView.h:55
static const char * usage
Definition: examples/CommandSequence.cpp:8
ConditionalCommand< TCommand, TCondition > makeConditional(TCommand *command, TCondition condition)
Definition: ConditionalCommand.h:70