本文整理汇总了C++中Visualizer类的典型用法代码示例。如果您正苦于以下问题:C++ Visualizer类的具体用法?C++ Visualizer怎么用?C++ Visualizer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Visualizer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: offset
void Visualizer::BodyFollower::generateControls(
const Visualizer& viz,
const State& state,
Array_< DecorativeGeometry >& geometry)
{
// Offset.
Vec3 offset(m_offset);
if (m_offset.isNaN()) {
// Default: offset is based on system up direction and ground height.
offset = Vec3(1, 1, 1);
offset[viz.getSystemUpDirection().getAxis()] += viz.getGroundHeight();
}
// Up direction. Default: use System up direction.
const UnitVec3& upDirection = m_upDirection.isNaN() ?
UnitVec3(viz.getSystemUpDirection()) : m_upDirection;
const Vec3 P = m_mobodB.findStationLocationInGround(state, m_stationPinB);
// Position of camera (C) from ground origin (G), expressed in ground.
const Vec3 p_GC = P + offset;
// Rotation of camera frame (C) in ground frame (G).
// To get the camera to point at P, we require the camera's z direction
// (which points "back") to be parallel to the offset. We also want the
// camera's y direction (which points to the top of the screen) to be as
// closely aligned with the provided up direction as is possible.
const Rotation R_GC(UnitVec3(offset), ZAxis, upDirection, YAxis);
viz.setCameraTransform(Transform(R_GC, p_GC));
}
示例2: TrialVisualizer
void TrialVisualizer()
{
Double_t width = 20;
Double_t xlow = 0;
Double_t xhi = 50;
Double_t x1=10;
for (Int_t i=0; i<n; i++)
{
TH1F *h = new TH1F(TString::Format("h%i",i),"",50,0,50);
Fill(h);
TLine *ll = new TLine(x1, 0, x1, 20);
ll->SetLineColor(3);
ll->SetLineWidth(3);
vlo.push_back(ll);
TLine *lh = new TLine(x1+width, 0, x1+width, 20);
lh->SetLineColor(3);
lh->SetLineWidth(3);
vhi.push_back(lh);
}
Visualizer vis;
vis.SetNRows(1);
vis.SetNColumns(4);
vis.Draw("h%i");
vis.DrawLines(vlo,"canvas=h color=3");
vis.DrawLines(vhi,"canvas=h color=2");
}
示例3: android_media_setPeriodicCapture
static jint
android_media_setPeriodicCapture(JNIEnv *env, jobject thiz, jint rate, jboolean jWaveform, jboolean jFft)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetLongField(thiz,
fields.fidJniData);
if (lpJniStorage == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
ALOGV("setPeriodicCapture: rate %d, jWaveform %d jFft %d",
rate,
jWaveform,
jFft);
uint32_t flags = Visualizer::CAPTURE_CALL_JAVA;
if (jWaveform) flags |= Visualizer::CAPTURE_WAVEFORM;
if (jFft) flags |= Visualizer::CAPTURE_FFT;
Visualizer::capture_cbk_t cbk = captureCallback;
if (!jWaveform && !jFft) cbk = NULL;
return translateError(lpVisualizer->setCaptureCallBack(cbk,
&lpJniStorage->mCallbackData,
flags,
rate));
}
示例4: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Visualizer w;
w.show();
return a.exec();
}
示例5: main
int main()
{
FileReader* pointCloudReader = new FileReader("Jiangtailgong.pcd");
Visualizer* visualizer = new Visualizer(pointCloudReader->getPointCloud());
visualizer->visualize();
return 0;
}
示例6: android_media_visualizer_native_setMeasurementMode
static jint
android_media_visualizer_native_setMeasurementMode(JNIEnv *env, jobject thiz, jint mode)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
return translateError(lpVisualizer->setMeasurementMode(mode));
}
示例7: android_media_visualizer_native_getCaptureSize
static jint
android_media_visualizer_native_getCaptureSize(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return -1;
}
return lpVisualizer->getCaptureSize();
}
开发者ID:AndroidOpenSourceProject,项目名称:platform_frameworks_base,代码行数:9,代码来源:android_media_Visualizer.cpp
示例8: android_media_visualizer_native_getMeasurementMode
static jint
android_media_visualizer_native_getMeasurementMode(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return MEASUREMENT_MODE_NONE;
}
return lpVisualizer->getMeasurementMode();
}
示例9: android_media_visualizer_native_getSamplingRate
static jint
android_media_visualizer_native_getSamplingRate(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return -1;
}
return (jint) lpVisualizer->getSamplingRate();
}
示例10: android_media_visualizer_native_getEnabled
static jboolean
android_media_visualizer_native_getEnabled(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return false;
}
return (jboolean)lpVisualizer->getEnabled();
}
开发者ID:AndroidOpenSourceProject,项目名称:platform_frameworks_base,代码行数:10,代码来源:android_media_Visualizer.cpp
示例11: android_media_visualizer_native_getEnabled
static jboolean
android_media_visualizer_native_getEnabled(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return JNI_FALSE;
}
if (lpVisualizer->getEnabled()) {
return JNI_TRUE;
} else {
return JNI_FALSE;
}
}
示例12: writeDotGraphToDisk
void CounterexampleAnalyzer::writeDotGraphToDisk(string filename, Visualizer& visualizer) {
cout << "generating dot IO graph file for an abstract STG:"<<filename<<endl;
string dotFile="digraph G {\n";
dotFile+=visualizer.abstractTransitionGraphToDot();
dotFile+="}\n";
write_file(filename, dotFile);
}
示例13: android_media_visualizer_native_getWaveForm
static jint
android_media_visualizer_native_getWaveForm(JNIEnv *env, jobject thiz, jbyteArray jWaveform)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
jbyte* nWaveform = (jbyte *) env->GetPrimitiveArrayCritical(jWaveform, NULL);
if (nWaveform == NULL) {
return VISUALIZER_ERROR_NO_MEMORY;
}
jint status = translateError(lpVisualizer->getWaveForm((uint8_t *)nWaveform));
env->ReleasePrimitiveArrayCritical(jWaveform, nWaveform, 0);
return status;
}
示例14: Visualizer
AudioProcessorEditor* DisplayNode::createEditor()
{
Visualizer* visualizer = new Visualizer(this, viewport, dataViewport);
GenericProcessor* source = (GenericProcessor*) getSourceNode();
visualizer->setBuffers(source->getContinuousBuffer(),source->getEventBuffer());
visualizer->setUIComponent(getUIComponent());
visualizer->setConfiguration(config);
setEditor(visualizer);
std::cout << "Creating visualizer." << std::endl;
return visualizer;
}
示例15: android_media_visualizer_native_getPeakRms
static jint
android_media_visualizer_native_getPeakRms(JNIEnv *env, jobject thiz, jobject jPeakRmsObj)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
int32_t measurements[2];
jint status = translateError(
lpVisualizer->getIntMeasurements(MEASUREMENT_MODE_PEAK_RMS,
2, measurements));
if (status == VISUALIZER_SUCCESS) {
// measurement worked, write the values to the java object
env->SetIntField(jPeakRmsObj, fields.fidPeak, measurements[MEASUREMENT_IDX_PEAK]);
env->SetIntField(jPeakRmsObj, fields.fidRms, measurements[MEASUREMENT_IDX_RMS]);
}
return status;
}